Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
kvdb
rocksdb
提交
fec42699
R
rocksdb
项目概览
kvdb
/
rocksdb
11 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rocksdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fec42699
编写于
5月 09, 2014
作者:
I
Igor Canadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix more gflag namespace issues
上级
a1068c91
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
58 addition
and
8 deletion
+58
-8
table/table_reader_bench.cc
table/table_reader_bench.cc
+16
-3
util/bloom_test.cc
util/bloom_test.cc
+13
-1
util/dynamic_bloom_test.cc
util/dynamic_bloom_test.cc
+13
-1
util/log_write_bench.cc
util/log_write_bench.cc
+16
-3
未找到文件。
table/table_reader_bench.cc
浏览文件 @
fec42699
...
...
@@ -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
(
"
\n
USAGE:
\n
"
)
+
std
::
string
(
argv
[
0
])
+
" [OPTIONS]..."
);
google
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
SetUsageMessage
(
std
::
string
(
"
\n
USAGE:
\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
util/bloom_test.cc
浏览文件 @
fec42699
...
...
@@ -7,6 +7,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#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/filter_policy.h"
...
...
@@ -15,6 +23,8 @@
#include "util/testharness.h"
#include "util/testutil.h"
using
GFLAGS
::
ParseCommandLineFlags
;
DEFINE_int32
(
bits_per_key
,
10
,
""
);
namespace
rocksdb
{
...
...
@@ -164,7 +174,9 @@ TEST(BloomTest, VaryingLengths) {
}
// namespace rocksdb
int
main
(
int
argc
,
char
**
argv
)
{
google
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
return
rocksdb
::
test
::
RunAllTests
();
}
#endif // GFLAGS
util/dynamic_bloom_test.cc
浏览文件 @
fec42699
...
...
@@ -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
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <algorithm>
...
...
@@ -15,6 +23,8 @@
#include "util/testutil.h"
#include "util/stop_watch.h"
using
GFLAGS
::
ParseCommandLineFlags
;
DEFINE_int32
(
bits_per_key
,
10
,
""
);
DEFINE_int32
(
num_probes
,
6
,
""
);
DEFINE_bool
(
enable_perf
,
false
,
""
);
...
...
@@ -196,7 +206,9 @@ TEST(DynamicBloomTest, perf) {
}
// namespace rocksdb
int
main
(
int
argc
,
char
**
argv
)
{
google
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
return
rocksdb
::
test
::
RunAllTests
();
}
#endif // GFLAGS
util/log_write_bench.cc
浏览文件 @
fec42699
...
...
@@ -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/env.h"
...
...
@@ -10,6 +18,9 @@
#include "util/testharness.h"
#include "util/testutil.h"
using
GFLAGS
::
ParseCommandLineFlags
;
using
GFLAGS
::
SetUsageMessage
;
// A simple benchmark to simulate transactional logs
DEFINE_int32
(
num_records
,
6000
,
"Number of records."
);
...
...
@@ -60,10 +71,12 @@ void RunBenchmark() {
}
// namespace rocksdb
int
main
(
int
argc
,
char
**
argv
)
{
google
::
SetUsageMessage
(
std
::
string
(
"
\n
USAGE:
\n
"
)
+
std
::
string
(
argv
[
0
])
+
" [OPTIONS]..."
);
google
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
SetUsageMessage
(
std
::
string
(
"
\n
USAGE:
\n
"
)
+
std
::
string
(
argv
[
0
])
+
" [OPTIONS]..."
);
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
rocksdb
::
RunBenchmark
();
return
0
;
}
#endif // GFLAGS
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录