Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
cf0726c6
提交
cf0726c6
authored
10月 22, 2013
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support benchmarks with larger databases
上级
d3c47d30
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
10 行增加
和
8 行删除
+10
-8
BenchCThread.java
h2/src/test/org/h2/test/bench/BenchCThread.java
+1
-1
TestPerformance.java
h2/src/test/org/h2/test/bench/TestPerformance.java
+8
-6
TestScalability.java
h2/src/test/org/h2/test/bench/TestScalability.java
+1
-1
没有找到文件。
h2/src/test/org/h2/test/bench/BenchCThread.java
浏览文件 @
cf0726c6
...
@@ -192,7 +192,7 @@ public class BenchCThread {
...
@@ -192,7 +192,7 @@ public class BenchCThread {
dist
[
i
]
=
rs
.
getString
(
3
+
i
);
dist
[
i
]
=
rs
.
getString
(
3
+
i
);
}
}
rs
.
close
();
rs
.
close
();
String
distInfo
=
dist
[
dId
-
1
];
String
distInfo
=
dist
[
(
dId
-
1
)
%
10
];
stock
[
number
-
1
]
=
sQuantity
;
stock
[
number
-
1
]
=
sQuantity
;
if
((
data
.
indexOf
(
"original"
)
!=
-
1
)
if
((
data
.
indexOf
(
"original"
)
!=
-
1
)
&&
(
sData
.
indexOf
(
"original"
)
!=
-
1
))
{
&&
(
sData
.
indexOf
(
"original"
)
!=
-
1
))
{
...
...
h2/src/test/org/h2/test/bench/TestPerformance.java
浏览文件 @
cf0726c6
...
@@ -71,6 +71,11 @@ public class TestPerformance implements Database.DatabaseTest {
...
@@ -71,6 +71,11 @@ public class TestPerformance implements Database.DatabaseTest {
int
dbId
=
-
1
;
int
dbId
=
-
1
;
boolean
exit
=
false
;
boolean
exit
=
false
;
String
out
=
"benchmark.html"
;
String
out
=
"benchmark.html"
;
Properties
prop
=
new
Properties
();
InputStream
in
=
getClass
().
getResourceAsStream
(
"test.properties"
);
prop
.
load
(
in
);
in
.
close
();
int
size
=
Integer
.
parseInt
(
prop
.
getProperty
(
"size"
));
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
String
arg
=
args
[
i
];
String
arg
=
args
[
i
];
if
(
"-db"
.
equals
(
arg
))
{
if
(
"-db"
.
equals
(
arg
))
{
...
@@ -83,13 +88,10 @@ public class TestPerformance implements Database.DatabaseTest {
...
@@ -83,13 +88,10 @@ public class TestPerformance implements Database.DatabaseTest {
trace
=
true
;
trace
=
true
;
}
else
if
(
"-exit"
.
equals
(
arg
))
{
}
else
if
(
"-exit"
.
equals
(
arg
))
{
exit
=
true
;
exit
=
true
;
}
else
if
(
"-size"
.
equals
(
arg
))
{
size
=
Integer
.
parseInt
(
args
[++
i
]);
}
}
}
}
Properties
prop
=
new
Properties
();
InputStream
in
=
getClass
().
getResourceAsStream
(
"test.properties"
);
prop
.
load
(
in
);
in
.
close
();
int
size
=
Integer
.
parseInt
(
prop
.
getProperty
(
"size"
));
ArrayList
<
Database
>
dbs
=
new
ArrayList
<
Database
>();
ArrayList
<
Database
>
dbs
=
new
ArrayList
<
Database
>();
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
if
(
dbId
!=
-
1
&&
i
!=
dbId
)
{
if
(
dbId
!=
-
1
&&
i
!=
dbId
)
{
...
@@ -230,7 +232,7 @@ public class TestPerformance implements Database.DatabaseTest {
...
@@ -230,7 +232,7 @@ public class TestPerformance implements Database.DatabaseTest {
conn
.
close
();
conn
.
close
();
db
.
log
(
"Executed statements"
,
"#"
,
db
.
getExecutedStatements
());
db
.
log
(
"Executed statements"
,
"#"
,
db
.
getExecutedStatements
());
db
.
log
(
"Total time"
,
"ms"
,
db
.
getTotalTime
());
db
.
log
(
"Total time"
,
"ms"
,
db
.
getTotalTime
());
int
statPerSec
=
db
.
getExecutedStatements
()
*
1000
/
db
.
getTotalTime
(
);
int
statPerSec
=
(
int
)
(
db
.
getExecutedStatements
()
*
1000L
/
db
.
getTotalTime
()
);
db
.
log
(
"Statements per second"
,
"#"
,
statPerSec
);
db
.
log
(
"Statements per second"
,
"#"
,
statPerSec
);
System
.
out
.
println
(
"Statements per second: "
+
statPerSec
);
System
.
out
.
println
(
"Statements per second: "
+
statPerSec
);
collect
=
false
;
collect
=
false
;
...
...
h2/src/test/org/h2/test/bench/TestScalability.java
浏览文件 @
cf0726c6
...
@@ -171,7 +171,7 @@ public class TestScalability implements Database.DatabaseTest {
...
@@ -171,7 +171,7 @@ public class TestScalability implements Database.DatabaseTest {
conn
.
close
();
conn
.
close
();
db
.
log
(
"Executed statements"
,
"#"
,
db
.
getExecutedStatements
());
db
.
log
(
"Executed statements"
,
"#"
,
db
.
getExecutedStatements
());
db
.
log
(
"Total time"
,
"ms"
,
db
.
getTotalTime
());
db
.
log
(
"Total time"
,
"ms"
,
db
.
getTotalTime
());
int
statPerSec
=
db
.
getExecutedStatements
()
*
1000
/
db
.
getTotalTime
(
);
int
statPerSec
=
(
int
)
(
db
.
getExecutedStatements
()
*
1000L
/
db
.
getTotalTime
()
);
db
.
log
(
"Statements per second"
,
"#"
,
statPerSec
);
db
.
log
(
"Statements per second"
,
"#"
,
statPerSec
);
System
.
out
.
println
(
"Statements per second: "
+
statPerSec
);
System
.
out
.
println
(
"Statements per second: "
+
statPerSec
);
collect
=
false
;
collect
=
false
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论