Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
kvdb
rocksdb
提交
d3b44f07
R
rocksdb
项目概览
kvdb
/
rocksdb
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
d3b44f07
编写于
4月 16, 2014
作者:
A
Ankit Gupta
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix white spaces
上级
6b0cc410
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
25 addition
and
25 deletion
+25
-25
java/RocksDBSample.java
java/RocksDBSample.java
+1
-1
java/org/rocksdb/HistogramData.java
java/org/rocksdb/HistogramData.java
+8
-8
java/org/rocksdb/HistogramType.java
java/org/rocksdb/HistogramType.java
+4
-4
java/org/rocksdb/Statistics.java
java/org/rocksdb/Statistics.java
+6
-6
java/org/rocksdb/TickerType.java
java/org/rocksdb/TickerType.java
+3
-3
java/rocksjni/statistics.cc
java/rocksjni/statistics.cc
+3
-3
未找到文件。
java/RocksDBSample.java
浏览文件 @
d3b44f07
...
...
@@ -132,7 +132,7 @@ public class RocksDBSample {
System
.
out
.
println
(
"Failed in call to getTickerCount()"
);
assert
(
false
);
//Should never reach here.
}
try
{
for
(
HistogramType
histogramType
:
HistogramType
.
values
())
{
HistogramData
data
=
stats
.
geHistogramData
(
histogramType
);
...
...
java/org/rocksdb/HistogramData.java
浏览文件 @
d3b44f07
...
...
@@ -11,8 +11,8 @@ public class HistogramData {
private
final
double
percentile99_
;
private
final
double
average_
;
private
final
double
standardDeviation_
;
public
HistogramData
(
double
median
,
double
percentile95
,
public
HistogramData
(
double
median
,
double
percentile95
,
double
percentile99
,
double
average
,
double
standardDeviation
)
{
median_
=
median
;
percentile95_
=
percentile95
;
...
...
@@ -20,24 +20,24 @@ public class HistogramData {
average_
=
average
;
standardDeviation_
=
standardDeviation
;
}
public
double
getMedian
()
{
return
median_
;
}
public
double
getPercentile95
()
{
return
percentile95_
;
}
public
double
getPercentile99
()
{
return
percentile99_
;
}
public
double
getAverage
()
{
return
average_
;
}
public
double
getStandardDeviation
()
{
return
standardDeviation_
;
}
}
\ No newline at end of file
}
java/org/rocksdb/HistogramType.java
浏览文件 @
d3b44f07
...
...
@@ -26,14 +26,14 @@ public enum HistogramType {
HARD_RATE_LIMIT_DELAY_COUNT
(
15
),
SOFT_RATE_LIMIT_DELAY_COUNT
(
16
),
NUM_FILES_IN_SINGLE_COMPACTION
(
17
);
private
final
int
value_
;
private
HistogramType
(
int
value
)
{
value_
=
value
;
}
public
int
getValue
()
{
return
value_
;
}
}
}
java/org/rocksdb/Statistics.java
浏览文件 @
d3b44f07
...
...
@@ -10,28 +10,28 @@ package org.rocksdb;
* is managed by Options class.
*/
public
class
Statistics
{
private
final
long
statsHandle_
;
public
Statistics
(
long
statsHandle
)
{
statsHandle_
=
statsHandle
;
}
public
long
getTickerCount
(
TickerType
tickerType
)
{
assert
(
isInitialized
());
return
getTickerCount0
(
tickerType
.
getValue
(),
statsHandle_
);
}
public
HistogramData
geHistogramData
(
HistogramType
histogramType
)
{
assert
(
isInitialized
());
HistogramData
hist
=
geHistogramData0
(
histogramType
.
getValue
(),
statsHandle_
);
return
hist
;
}
private
boolean
isInitialized
()
{
return
(
statsHandle_
!=
0
);
}
private
native
long
getTickerCount0
(
int
tickerType
,
long
handle
);
private
native
HistogramData
geHistogramData0
(
int
histogramType
,
long
handle
);
}
java/org/rocksdb/TickerType.java
浏览文件 @
d3b44f07
...
...
@@ -110,13 +110,13 @@ public enum TickerType {
NUMBER_SUPERVERSION_ACQUIRES
(
48
),
NUMBER_SUPERVERSION_RELEASES
(
49
),
NUMBER_SUPERVERSION_CLEANUPS
(
50
);
private
final
int
value_
;
private
TickerType
(
int
value
)
{
value_
=
value
;
}
public
int
getValue
()
{
return
value_
;
}
...
...
java/rocksjni/statistics.cc
浏览文件 @
d3b44f07
...
...
@@ -24,7 +24,7 @@ jlong Java_org_rocksdb_Statistics_getTickerCount0(
JNIEnv
*
env
,
jobject
jobj
,
int
tickerType
,
jlong
handle
)
{
auto
st
=
reinterpret_cast
<
rocksdb
::
Statistics
*>
(
handle
);
assert
(
st
!=
nullptr
);
return
st
->
getTickerCount
(
static_cast
<
rocksdb
::
Tickers
>
(
tickerType
));
}
...
...
@@ -32,11 +32,11 @@ jobject Java_org_rocksdb_Statistics_geHistogramData0(
JNIEnv
*
env
,
jobject
jobj
,
int
histogramType
,
jlong
handle
)
{
auto
st
=
reinterpret_cast
<
rocksdb
::
Statistics
*>
(
handle
);
assert
(
st
!=
nullptr
);
rocksdb
::
HistogramData
data
;
st
->
histogramData
(
static_cast
<
rocksdb
::
Histograms
>
(
histogramType
),
&
data
);
// Don't reuse class pointer
jclass
jclazz
=
env
->
FindClass
(
"org/rocksdb/HistogramData"
);
jmethodID
mid
=
rocksdb
::
HistogramDataJni
::
getConstructorMethodId
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录