Feathercoin  0.5.0
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
leveldb::Benchmark Class Reference
Collaboration diagram for leveldb::Benchmark:
Collaboration graph
[legend]

Classes

struct  ThreadArg
 

Public Types

enum  Order { SEQUENTIAL, RANDOM, SEQUENTIAL, RANDOM }
 
enum  DBState { FRESH, EXISTING, FRESH, EXISTING }
 
enum  Order { SEQUENTIAL, RANDOM, SEQUENTIAL, RANDOM }
 
enum  DBState { FRESH, EXISTING, FRESH, EXISTING }
 

Public Member Functions

 Benchmark ()
 
 ~Benchmark ()
 
void Run ()
 
 Benchmark ()
 
 ~Benchmark ()
 
void Run ()
 
void Open ()
 
void Write (bool write_sync, Order order, DBState state, int num_entries, int value_size, int entries_per_batch)
 
void Read (Order order, int entries_per_batch)
 
void ReadSequential ()
 
 Benchmark ()
 
 ~Benchmark ()
 
void Run ()
 

Private Member Functions

void PrintHeader ()
 
void PrintWarnings ()
 
void PrintEnvironment ()
 
void RunBenchmark (int n, Slice name, void(Benchmark::*method)(ThreadState *))
 
void Crc32c (ThreadState *thread)
 
void AcquireLoad (ThreadState *thread)
 
void SnappyCompress (ThreadState *thread)
 
void SnappyUncompress (ThreadState *thread)
 
void Open ()
 
void WriteSeq (ThreadState *thread)
 
void WriteRandom (ThreadState *thread)
 
void DoWrite (ThreadState *thread, bool seq)
 
void ReadSequential (ThreadState *thread)
 
void ReadReverse (ThreadState *thread)
 
void ReadRandom (ThreadState *thread)
 
void ReadMissing (ThreadState *thread)
 
void ReadHot (ThreadState *thread)
 
void SeekRandom (ThreadState *thread)
 
void DoDelete (ThreadState *thread, bool seq)
 
void DeleteSeq (ThreadState *thread)
 
void DeleteRandom (ThreadState *thread)
 
void ReadWhileWriting (ThreadState *thread)
 
void Compact (ThreadState *thread)
 
void PrintStats (const char *key)
 
void HeapProfile ()
 
void PrintHeader ()
 
void PrintWarnings ()
 
void PrintEnvironment ()
 
void Start ()
 
void FinishedSingleOp ()
 
void Stop (const Slice &name)
 
void PrintHeader ()
 
void PrintWarnings ()
 
void PrintEnvironment ()
 
void Start ()
 
void FinishedSingleOp ()
 
void Stop (const Slice &name)
 
void Open (bool sync)
 
void Write (bool sync, Order order, DBState state, int num_entries, int value_size, int entries_per_batch)
 
void ReadSequential ()
 
void ReadRandom ()
 

Static Private Member Functions

static void ThreadBody (void *v)
 
static void WriteToFile (void *arg, const char *buf, int n)
 

Private Attributes

Cachecache_
 
const FilterPolicyfilter_policy_
 
DBdb_
 
int num_
 
int value_size_
 
int entries_per_batch_
 
WriteOptions write_options_
 
int reads_
 
int heap_counter_
 
sqlite3 * db_
 
int db_num_
 
double start_
 
double last_op_finish_
 
int64_t bytes_
 
std::string message_
 
Histogram hist_
 
RandomGenerator gen_
 
Random rand_
 
int done_
 
int next_report_
 
kyotocabinet::TreeDB * db_
 
kyotocabinet::LZOCompressor
< kyotocabinet::LZO::RAW > 
comp_
 

Detailed Description

Definition at line 302 of file db_bench.cc.

Member Enumeration Documentation

Enumerator
FRESH 
EXISTING 
FRESH 
EXISTING 

Definition at line 286 of file db_bench_tree_db.cc.

Enumerator
FRESH 
EXISTING 
FRESH 
EXISTING 

Definition at line 310 of file db_bench_sqlite3.cc.

Enumerator
SEQUENTIAL 
RANDOM 
SEQUENTIAL 
RANDOM 

Definition at line 282 of file db_bench_tree_db.cc.

Enumerator
SEQUENTIAL 
RANDOM 
SEQUENTIAL 
RANDOM 

Definition at line 306 of file db_bench_sqlite3.cc.

Constructor & Destructor Documentation

leveldb::Benchmark::Benchmark ( )
inline

Definition at line 389 of file db_bench.cc.

leveldb::Benchmark::~Benchmark ( )
inline

Definition at line 412 of file db_bench.cc.

leveldb::Benchmark::Benchmark ( )
inline

Definition at line 315 of file db_bench_sqlite3.cc.

leveldb::Benchmark::~Benchmark ( )
inline

Definition at line 338 of file db_bench_sqlite3.cc.

leveldb::Benchmark::Benchmark ( )
inline

Definition at line 291 of file db_bench_tree_db.cc.

leveldb::Benchmark::~Benchmark ( )
inline

Definition at line 313 of file db_bench_tree_db.cc.

Member Function Documentation

void leveldb::Benchmark::AcquireLoad ( ThreadState *  thread)
inlineprivate

Definition at line 627 of file db_bench.cc.

void leveldb::Benchmark::Compact ( ThreadState *  thread)
inlineprivate

Definition at line 890 of file db_bench.cc.

void leveldb::Benchmark::Crc32c ( ThreadState *  thread)
inlineprivate

Definition at line 608 of file db_bench.cc.

void leveldb::Benchmark::DeleteRandom ( ThreadState *  thread)
inlineprivate

Definition at line 856 of file db_bench.cc.

void leveldb::Benchmark::DeleteSeq ( ThreadState *  thread)
inlineprivate

Definition at line 852 of file db_bench.cc.

void leveldb::Benchmark::DoDelete ( ThreadState *  thread,
bool  seq 
)
inlineprivate

Definition at line 831 of file db_bench.cc.

void leveldb::Benchmark::DoWrite ( ThreadState *  thread,
bool  seq 
)
inlineprivate

Definition at line 713 of file db_bench.cc.

void leveldb::Benchmark::FinishedSingleOp ( )
inlineprivate

Definition at line 226 of file db_bench_tree_db.cc.

void leveldb::Benchmark::FinishedSingleOp ( )
inlineprivate

Definition at line 250 of file db_bench_sqlite3.cc.

void leveldb::Benchmark::HeapProfile ( )
inlineprivate

Definition at line 906 of file db_bench.cc.

void leveldb::Benchmark::Open ( bool  sync)
inlineprivate

Definition at line 389 of file db_bench_tree_db.cc.

void leveldb::Benchmark::Open ( )
inline

Definition at line 417 of file db_bench_sqlite3.cc.

void leveldb::Benchmark::Open ( )
inlineprivate

Definition at line 690 of file db_bench.cc.

void leveldb::Benchmark::PrintEnvironment ( )
inlineprivate

Definition at line 181 of file db_bench_tree_db.cc.

void leveldb::Benchmark::PrintEnvironment ( )
inlineprivate

Definition at line 206 of file db_bench_sqlite3.cc.

void leveldb::Benchmark::PrintEnvironment ( )
inlineprivate

Definition at line 353 of file db_bench.cc.

void leveldb::Benchmark::PrintHeader ( )
inlineprivate

Definition at line 151 of file db_bench_tree_db.cc.

void leveldb::Benchmark::PrintHeader ( )
inlineprivate

Definition at line 181 of file db_bench_sqlite3.cc.

void leveldb::Benchmark::PrintHeader ( )
inlineprivate

Definition at line 314 of file db_bench.cc.

void leveldb::Benchmark::PrintStats ( const char *  key)
inlineprivate

Definition at line 894 of file db_bench.cc.

void leveldb::Benchmark::PrintWarnings ( )
inlineprivate

Definition at line 169 of file db_bench_tree_db.cc.

void leveldb::Benchmark::PrintWarnings ( )
inlineprivate

Definition at line 194 of file db_bench_sqlite3.cc.

void leveldb::Benchmark::PrintWarnings ( )
inlineprivate

Definition at line 332 of file db_bench.cc.

void leveldb::Benchmark::Read ( Order  order,
int  entries_per_batch 
)
inline

Definition at line 581 of file db_bench_sqlite3.cc.

void leveldb::Benchmark::ReadHot ( ThreadState *  thread)
inlineprivate

Definition at line 799 of file db_bench.cc.

void leveldb::Benchmark::ReadMissing ( ThreadState *  thread)
inlineprivate

Definition at line 787 of file db_bench.cc.

void leveldb::Benchmark::ReadRandom ( )
inlineprivate

Definition at line 470 of file db_bench_tree_db.cc.

void leveldb::Benchmark::ReadRandom ( ThreadState *  thread)
inlineprivate

Definition at line 769 of file db_bench.cc.

void leveldb::Benchmark::ReadReverse ( ThreadState *  thread)
inlineprivate

Definition at line 756 of file db_bench.cc.

void leveldb::Benchmark::ReadSequential ( )
inlineprivate

Definition at line 459 of file db_bench_tree_db.cc.

void leveldb::Benchmark::ReadSequential ( )
inline

Definition at line 649 of file db_bench_sqlite3.cc.

void leveldb::Benchmark::ReadSequential ( ThreadState *  thread)
inlineprivate

Definition at line 743 of file db_bench.cc.

void leveldb::Benchmark::ReadWhileWriting ( ThreadState *  thread)
inlineprivate

Definition at line 860 of file db_bench.cc.

void leveldb::Benchmark::Run ( )
inline

Definition at line 319 of file db_bench_tree_db.cc.

void leveldb::Benchmark::Run ( )
inline

Definition at line 343 of file db_bench_sqlite3.cc.

void leveldb::Benchmark::Run ( )
inline

Definition at line 418 of file db_bench.cc.

void leveldb::Benchmark::RunBenchmark ( int  n,
Slice  name,
void(Benchmark::*)(ThreadState *)  method 
)
inlineprivate

Definition at line 567 of file db_bench.cc.

void leveldb::Benchmark::SeekRandom ( ThreadState *  thread)
inlineprivate

Definition at line 812 of file db_bench.cc.

void leveldb::Benchmark::SnappyCompress ( ThreadState *  thread)
inlineprivate

Definition at line 643 of file db_bench.cc.

void leveldb::Benchmark::SnappyUncompress ( ThreadState *  thread)
inlineprivate

Definition at line 668 of file db_bench.cc.

void leveldb::Benchmark::Start ( )
inlineprivate

Definition at line 216 of file db_bench_tree_db.cc.

void leveldb::Benchmark::Start ( )
inlineprivate

Definition at line 240 of file db_bench_sqlite3.cc.

void leveldb::Benchmark::Stop ( const Slice name)
inlineprivate

Definition at line 252 of file db_bench_tree_db.cc.

void leveldb::Benchmark::Stop ( const Slice name)
inlineprivate

Definition at line 276 of file db_bench_sqlite3.cc.

static void leveldb::Benchmark::ThreadBody ( void *  v)
inlinestaticprivate

Definition at line 539 of file db_bench.cc.

void leveldb::Benchmark::Write ( bool  sync,
Order  order,
DBState  state,
int  num_entries,
int  value_size,
int  entries_per_batch 
)
inlineprivate

Definition at line 424 of file db_bench_tree_db.cc.

void leveldb::Benchmark::Write ( bool  write_sync,
Order  order,
DBState  state,
int  num_entries,
int  value_size,
int  entries_per_batch 
)
inline

Definition at line 478 of file db_bench_sqlite3.cc.

void leveldb::Benchmark::WriteRandom ( ThreadState *  thread)
inlineprivate

Definition at line 709 of file db_bench.cc.

void leveldb::Benchmark::WriteSeq ( ThreadState *  thread)
inlineprivate

Definition at line 705 of file db_bench.cc.

static void leveldb::Benchmark::WriteToFile ( void *  arg,
const char *  buf,
int  n 
)
inlinestaticprivate

Definition at line 902 of file db_bench.cc.

Member Data Documentation

int64_t leveldb::Benchmark::bytes_
private

Definition at line 171 of file db_bench_sqlite3.cc.

Cache* leveldb::Benchmark::cache_
private

Definition at line 304 of file db_bench.cc.

kyotocabinet::LZOCompressor<kyotocabinet::LZO::RAW> leveldb::Benchmark::comp_
private

Definition at line 145 of file db_bench_tree_db.cc.

kyotocabinet::TreeDB* leveldb::Benchmark::db_
private

Definition at line 134 of file db_bench_tree_db.cc.

sqlite3* leveldb::Benchmark::db_
private

Definition at line 165 of file db_bench_sqlite3.cc.

DB* leveldb::Benchmark::db_
private

Definition at line 306 of file db_bench.cc.

int leveldb::Benchmark::db_num_
private

Definition at line 166 of file db_bench_sqlite3.cc.

int leveldb::Benchmark::done_
private

Definition at line 178 of file db_bench_sqlite3.cc.

int leveldb::Benchmark::entries_per_batch_
private

Definition at line 309 of file db_bench.cc.

const FilterPolicy* leveldb::Benchmark::filter_policy_
private

Definition at line 305 of file db_bench.cc.

RandomGenerator leveldb::Benchmark::gen_
private

Definition at line 174 of file db_bench_sqlite3.cc.

int leveldb::Benchmark::heap_counter_
private

Definition at line 312 of file db_bench.cc.

Histogram leveldb::Benchmark::hist_
private

Definition at line 173 of file db_bench_sqlite3.cc.

double leveldb::Benchmark::last_op_finish_
private

Definition at line 170 of file db_bench_sqlite3.cc.

std::string leveldb::Benchmark::message_
private

Definition at line 172 of file db_bench_sqlite3.cc.

int leveldb::Benchmark::next_report_
private

Definition at line 179 of file db_bench_sqlite3.cc.

int leveldb::Benchmark::num_
private

Definition at line 307 of file db_bench.cc.

Random leveldb::Benchmark::rand_
private

Definition at line 175 of file db_bench_sqlite3.cc.

int leveldb::Benchmark::reads_
private

Definition at line 311 of file db_bench.cc.

double leveldb::Benchmark::start_
private

Definition at line 169 of file db_bench_sqlite3.cc.

int leveldb::Benchmark::value_size_
private

Definition at line 308 of file db_bench.cc.

WriteOptions leveldb::Benchmark::write_options_
private

Definition at line 310 of file db_bench.cc.


The documentation for this class was generated from the following files: