|
|
|
@ -3,6 +3,14 @@ |
|
|
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
|
|
|
|
|
#ifndef GFLAGS |
|
|
|
|
#include <cstdio> |
|
|
|
|
int main() { |
|
|
|
|
fprintf(stderr, "Please install gflags to run rocksdb tools\n"); |
|
|
|
|
return 1; |
|
|
|
|
} |
|
|
|
|
#else |
|
|
|
|
|
|
|
|
|
#include <gflags/gflags.h> |
|
|
|
|
|
|
|
|
|
#include "rocksdb/db.h" |
|
|
|
@ -18,6 +26,9 @@ |
|
|
|
|
#include "util/testharness.h" |
|
|
|
|
#include "util/testutil.h" |
|
|
|
|
|
|
|
|
|
using GFLAGS::ParseCommandLineFlags; |
|
|
|
|
using GFLAGS::SetUsageMessage; |
|
|
|
|
|
|
|
|
|
namespace rocksdb { |
|
|
|
|
|
|
|
|
|
namespace { |
|
|
|
@ -232,9 +243,9 @@ DEFINE_string(time_unit, "microsecond", |
|
|
|
|
"`microsecond` (default) or `nanosecond`"); |
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv) { |
|
|
|
|
google::SetUsageMessage(std::string("\nUSAGE:\n") + std::string(argv[0]) + |
|
|
|
|
" [OPTIONS]..."); |
|
|
|
|
google::ParseCommandLineFlags(&argc, &argv, true); |
|
|
|
|
SetUsageMessage(std::string("\nUSAGE:\n") + std::string(argv[0]) + |
|
|
|
|
" [OPTIONS]..."); |
|
|
|
|
ParseCommandLineFlags(&argc, &argv, true); |
|
|
|
|
|
|
|
|
|
rocksdb::TableFactory* tf = new rocksdb::BlockBasedTableFactory(); |
|
|
|
|
rocksdb::Options options; |
|
|
|
@ -269,3 +280,5 @@ int main(int argc, char** argv) { |
|
|
|
|
delete tf; |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endif // GFLAGS
|
|
|
|
|