Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
8b6b45de
提交
8b6b45de
authored
6 年前
作者:
Andrei Tokar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
eliminate commit of empty batch
上级
3e51c53e
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
8 行增加
和
9 行删除
+8
-9
BenchA.java
h2/src/test/org/h2/test/bench/BenchA.java
+3
-3
BenchB.java
h2/src/test/org/h2/test/bench/BenchB.java
+3
-4
BenchSimple.java
h2/src/test/org/h2/test/bench/BenchSimple.java
+2
-2
没有找到文件。
h2/src/test/org/h2/test/bench/BenchA.java
浏览文件 @
8b6b45de
...
@@ -71,7 +71,7 @@ public class BenchA implements Bench {
...
@@ -71,7 +71,7 @@ public class BenchA implements Bench {
for
(
int
i
=
0
;
i
<
branches
*
scale
;
i
++)
{
for
(
int
i
=
0
;
i
<
branches
*
scale
;
i
++)
{
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
1
,
i
);
db
.
update
(
prep
,
"insertBranches"
);
db
.
update
(
prep
,
"insertBranches"
);
if
(
i
%
commitEvery
==
0
)
{
if
(
(
i
+
1
)
%
commitEvery
==
0
)
{
db
.
commit
();
db
.
commit
();
}
}
}
}
...
@@ -83,7 +83,7 @@ public class BenchA implements Bench {
...
@@ -83,7 +83,7 @@ public class BenchA implements Bench {
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
2
,
i
/
tellers
);
prep
.
setInt
(
2
,
i
/
tellers
);
db
.
update
(
prep
,
"insertTellers"
);
db
.
update
(
prep
,
"insertTellers"
);
if
(
i
%
commitEvery
==
0
)
{
if
(
(
i
+
1
)
%
commitEvery
==
0
)
{
db
.
commit
();
db
.
commit
();
}
}
}
}
...
@@ -96,7 +96,7 @@ public class BenchA implements Bench {
...
@@ -96,7 +96,7 @@ public class BenchA implements Bench {
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
2
,
i
/
accounts
);
prep
.
setInt
(
2
,
i
/
accounts
);
db
.
update
(
prep
,
"insertAccounts"
);
db
.
update
(
prep
,
"insertAccounts"
);
if
(
i
%
commitEvery
==
0
)
{
if
(
(
i
+
1
)
%
commitEvery
==
0
)
{
db
.
commit
();
db
.
commit
();
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/bench/BenchB.java
浏览文件 @
8b6b45de
...
@@ -97,7 +97,7 @@ public class BenchB implements Bench, Runnable {
...
@@ -97,7 +97,7 @@ public class BenchB implements Bench, Runnable {
for
(
int
i
=
0
;
i
<
BRANCHES
*
SCALE
;
i
++)
{
for
(
int
i
=
0
;
i
<
BRANCHES
*
SCALE
;
i
++)
{
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
1
,
i
);
db
.
update
(
prep
,
"insertBranches"
);
db
.
update
(
prep
,
"insertBranches"
);
if
(
i
%
commitEvery
==
0
)
{
if
(
(
i
+
1
)
%
commitEvery
==
0
)
{
db
.
commit
();
db
.
commit
();
}
}
}
}
...
@@ -108,7 +108,7 @@ public class BenchB implements Bench, Runnable {
...
@@ -108,7 +108,7 @@ public class BenchB implements Bench, Runnable {
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
2
,
i
/
TELLERS
);
prep
.
setInt
(
2
,
i
/
TELLERS
);
db
.
update
(
prep
,
"insertTellers"
);
db
.
update
(
prep
,
"insertTellers"
);
if
(
i
%
commitEvery
==
0
)
{
if
(
(
i
+
1
)
%
commitEvery
==
0
)
{
db
.
commit
();
db
.
commit
();
}
}
}
}
...
@@ -120,7 +120,7 @@ public class BenchB implements Bench, Runnable {
...
@@ -120,7 +120,7 @@ public class BenchB implements Bench, Runnable {
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
2
,
i
/
ACCOUNTS
);
prep
.
setInt
(
2
,
i
/
ACCOUNTS
);
db
.
update
(
prep
,
"insertAccounts"
);
db
.
update
(
prep
,
"insertAccounts"
);
if
(
i
%
commitEvery
==
0
)
{
if
(
(
i
+
1
)
%
commitEvery
==
0
)
{
db
.
commit
();
db
.
commit
();
}
}
}
}
...
@@ -171,7 +171,6 @@ public class BenchB implements Bench, Runnable {
...
@@ -171,7 +171,6 @@ public class BenchB implements Bench, Runnable {
updateAccount
.
setInt
(
1
,
delta
);
updateAccount
.
setInt
(
1
,
delta
);
updateAccount
.
setInt
(
2
,
account
);
updateAccount
.
setInt
(
2
,
account
);
master
.
database
.
update
(
updateAccount
,
"UpdateAccounts"
);
master
.
database
.
update
(
updateAccount
,
"UpdateAccounts"
);
updateAccount
.
executeUpdate
();
// SELECT ABALANCE FROM ACCOUNTS WHERE AID=?
// SELECT ABALANCE FROM ACCOUNTS WHERE AID=?
selectAccount
.
setInt
(
1
,
account
);
selectAccount
.
setInt
(
1
,
account
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/bench/BenchSimple.java
浏览文件 @
8b6b45de
...
@@ -36,7 +36,7 @@ public class BenchSimple implements Bench {
...
@@ -36,7 +36,7 @@ public class BenchSimple implements Bench {
prep
.
setInt
(
1
,
i
);
prep
.
setInt
(
1
,
i
);
prep
.
setString
(
2
,
"Hello World "
+
i
);
prep
.
setString
(
2
,
"Hello World "
+
i
);
db
.
update
(
prep
,
"insertTest"
);
db
.
update
(
prep
,
"insertTest"
);
if
(
i
%
commitEvery
==
0
)
{
if
(
(
i
+
1
)
%
commitEvery
==
0
)
{
db
.
commit
();
db
.
commit
();
}
}
}
}
...
@@ -78,7 +78,7 @@ public class BenchSimple implements Bench {
...
@@ -78,7 +78,7 @@ public class BenchSimple implements Bench {
db
.
start
(
this
,
"Update (sequential)"
);
db
.
start
(
this
,
"Update (sequential)"
);
prep
=
db
.
prepare
(
"UPDATE TEST SET NAME=? WHERE ID=?"
);
prep
=
db
.
prepare
(
"UPDATE TEST SET NAME=? WHERE ID=?"
);
for
(
int
i
=
0
;
i
<
records
;
i
+=
3
)
{
for
(
int
i
=
0
;
i
<
records
;
i
+=
3
)
{
prep
.
setString
(
1
,
"Hallo Welt
"
);
prep
.
setString
(
1
,
"Hallo Welt
"
+
i
);
prep
.
setInt
(
2
,
i
);
prep
.
setInt
(
2
,
i
);
db
.
update
(
prep
,
"updateTest"
);
db
.
update
(
prep
,
"updateTest"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论