#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include "db/db_impl.h"
#include "db/version_set.h"
#include "leveldb/cache.h"
#include "leveldb/db.h"
#include "leveldb/env.h"
#include "leveldb/write_batch.h"
#include "port/port.h"
#include "util/crc32c.h"
#include "util/histogram.h"
#include "util/mutexlock.h"
#include "util/random.h"
#include "util/testutil.h"
Go to the source code of this file.
§ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 956 of file db_bench.cc.
961 std::string default_db_path;
963 for (
int i = 1; i < argc; i++) {
969 }
else if (sscanf(argv[i],
"--compression_ratio=%lf%c", &d, &junk) == 1) {
971 }
else if (sscanf(argv[i],
"--histogram=%d%c", &n, &junk) == 1 &&
972 (n == 0 || n == 1)) {
974 }
else if (sscanf(argv[i],
"--use_existing_db=%d%c", &n, &junk) == 1 &&
975 (n == 0 || n == 1)) {
977 }
else if (sscanf(argv[i],
"--reuse_logs=%d%c", &n, &junk) == 1 &&
978 (n == 0 || n == 1)) {
980 }
else if (sscanf(argv[i],
"--num=%d%c", &n, &junk) == 1) {
982 }
else if (sscanf(argv[i],
"--reads=%d%c", &n, &junk) == 1) {
984 }
else if (sscanf(argv[i],
"--threads=%d%c", &n, &junk) == 1) {
986 }
else if (sscanf(argv[i],
"--value_size=%d%c", &n, &junk) == 1) {
988 }
else if (sscanf(argv[i],
"--write_buffer_size=%d%c", &n, &junk) == 1) {
990 }
else if (sscanf(argv[i],
"--max_file_size=%d%c", &n, &junk) == 1) {
992 }
else if (sscanf(argv[i],
"--block_size=%d%c", &n, &junk) == 1) {
994 }
else if (sscanf(argv[i],
"--cache_size=%d%c", &n, &junk) == 1) {
996 }
else if (sscanf(argv[i],
"--bloom_bits=%d%c", &n, &junk) == 1) {
998 }
else if (sscanf(argv[i],
"--open_files=%d%c", &n, &junk) == 1) {
1000 }
else if (strncmp(argv[i],
"--db=", 5) == 0) {
1003 fprintf(stderr,
"Invalid flag '%s'\n", argv[i]);
1013 default_db_path +=
"/dbbench";
1014 FLAGS_db = default_db_path.c_str();
static int FLAGS_open_files
static int FLAGS_value_size
static const char * FLAGS_db
virtual Status GetTestDirectory(std::string *path)=0
static const char * FLAGS_benchmarks
static int FLAGS_max_file_size
static int FLAGS_cache_size
static int FLAGS_write_buffer_size
static int FLAGS_block_size
static bool FLAGS_reuse_logs
static bool FLAGS_use_existing_db
static double FLAGS_compression_ratio
static int FLAGS_bloom_bits
static bool FLAGS_histogram
§ FLAGS_benchmarks
| const char* FLAGS_benchmarks |
|
static |
Initial value:=
"fillseq,"
"fillsync,"
"fillrandom,"
"overwrite,"
"readrandom,"
"readrandom,"
"readseq,"
"readreverse,"
"compact,"
"readrandom,"
"readseq,"
"readreverse,"
"fill100K,"
"crc32c,"
"snappycomp,"
"snappyuncomp,"
"acquireload,"
Definition at line 44 of file db_bench.cc.
§ FLAGS_block_size
§ FLAGS_bloom_bits
| int FLAGS_bloom_bits = -1 |
|
static |
§ FLAGS_cache_size
| int FLAGS_cache_size = -1 |
|
static |
§ FLAGS_compression_ratio
| double FLAGS_compression_ratio = 0.5 |
|
static |
§ FLAGS_db
| const char* FLAGS_db = NULL |
|
static |
§ FLAGS_histogram
| bool FLAGS_histogram = false |
|
static |
§ FLAGS_max_file_size
| int FLAGS_max_file_size = 0 |
|
static |
§ FLAGS_num
§ FLAGS_open_files
§ FLAGS_reads
§ FLAGS_reuse_logs
| bool FLAGS_reuse_logs = false |
|
static |
§ FLAGS_threads
§ FLAGS_use_existing_db
| bool FLAGS_use_existing_db = false |
|
static |
§ FLAGS_value_size
| int FLAGS_value_size = 100 |
|
static |
§ FLAGS_write_buffer_size
| int FLAGS_write_buffer_size = 0 |
|
static |