db_stress.cc 848 B

12345678910111213141516171819202122232425
  1. // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
  2. // This source code is licensed under both the GPLv2 (found in the
  3. // COPYING file in the root directory) and Apache 2.0 License
  4. // (found in the LICENSE.Apache file in the root directory).
  5. //
  6. // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
  7. // Use of this source code is governed by a BSD-style license that can be
  8. // found in the LICENSE file. See the AUTHORS file for names of contributors.
  9. #ifndef GFLAGS
  10. #include <cstdio>
  11. int main() {
  12. fprintf(stderr, "Please install gflags to run rocksdb tools\n");
  13. return 1;
  14. }
  15. #else
  16. #include "port/stack_trace.h"
  17. #include "rocksdb/db_stress_tool.h"
  18. int main(int argc, char** argv) {
  19. ROCKSDB_NAMESPACE::port::InstallStackTraceHandler();
  20. return ROCKSDB_NAMESPACE::db_stress_tool(argc, argv);
  21. }
  22. #endif // GFLAGS