Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Questdb
提交
7836466a
Q
Questdb
项目概览
jobily
/
Questdb
10 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
Questdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
7836466a
编写于
9月 14, 2021
作者:
M
Marius
提交者:
GitHub
9月 14, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(ci) run mvn from root directory (#1317)
上级
2a490bd8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
22 deletion
+21
-22
benchmarks/src/main/java/org/questdb/OooCppBenchmarkSetMemoryShuffle.java
...ain/java/org/questdb/OooCppBenchmarkSetMemoryShuffle.java
+11
-12
benchmarks/src/main/java/org/questdb/OooCppBenchmarkSetMemoryVanilla.java
...ain/java/org/questdb/OooCppBenchmarkSetMemoryVanilla.java
+8
-8
ci/templates/check-changes-job.yml
ci/templates/check-changes-job.yml
+1
-1
ci/templates/steps.yml
ci/templates/steps.yml
+1
-1
未找到文件。
benchmarks/src/main/java/org/questdb/OooCppBenchmarkSetMemoryShuffle.java
浏览文件 @
7836466a
...
...
@@ -41,16 +41,15 @@ public class OooCppBenchmarkSetMemoryShuffle {
}
private
static
void
testSetMemoryShuffleToCsv
()
{
var
r
=
new
OooCppBenchmarkSetMemoryVanilla
();
long
index
=
Unsafe
.
getUnsafe
().
allocateMemory
(
BUFFER_MAX_SIZE
*
2
);
long
src
=
Unsafe
.
getUnsafe
().
allocateMemory
(
BUFFER_MAX_SIZE
);
long
dest
=
Unsafe
.
getUnsafe
().
allocateMemory
(
BUFFER_MAX_SIZE
);
System
.
out
.
print
ln
(
String
.
format
(
"src=%d, dest=%d, index=%d\n"
,
src
,
dest
,
index
)
);
System
.
out
.
print
f
(
"src=%d, dest=%d, index=%d\n%n"
,
src
,
dest
,
index
);
Rnd
random
=
new
Rnd
();
long
size
=
BUFFER_MAX_SIZE
/
Long
.
BYTES
;
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
Unsafe
.
getUnsafe
().
putLong
(
index
+
(
i
+
1
)
*
Long
.
BYTES
,
Math
.
abs
(
random
.
nextLong
())
%
size
);
Unsafe
.
getUnsafe
().
putLong
(
index
+
(
i
+
1
L
)
*
Long
.
BYTES
,
Math
.
abs
(
random
.
nextLong
())
%
size
);
}
try
{
...
...
@@ -59,9 +58,9 @@ public class OooCppBenchmarkSetMemoryShuffle {
int
iterations
=
100
;
for
(
int
i
=
1
;
i
<
50
;
i
+=
1
)
{
var
timeout1
=
runReshufle64
(
iterations
,
i
,
index
,
src
,
dest
);
var
timeout2
=
runReshufle32
(
iterations
,
i
,
index
,
src
,
dest
);
var
timeout3
=
runReshufle16
(
iterations
,
i
,
index
,
src
,
dest
);
double
timeout1
=
runReshufle64
(
iterations
,
i
,
index
,
src
,
dest
);
double
timeout2
=
runReshufle32
(
iterations
,
i
,
index
,
src
,
dest
);
double
timeout3
=
runReshufle16
(
iterations
,
i
,
index
,
src
,
dest
);
System
.
out
.
println
(
""
+
i
+
", "
+
timeout1
+
", "
+
timeout2
+
", "
+
timeout3
);
}
}
finally
{
...
...
@@ -72,35 +71,35 @@ public class OooCppBenchmarkSetMemoryShuffle {
}
private
static
double
runReshufle64
(
int
iterations
,
int
mb
,
long
index
,
long
src
,
long
dest
)
{
var
nt
=
System
.
nanoTime
();
long
nt
=
System
.
nanoTime
();
long
size
=
MB
*
mb
/
8
;
for
(
int
j
=
0
;
j
<
iterations
;
j
++)
{
Vect
.
indexReshuffle64Bit
(
src
,
dest
,
index
,
size
);
}
var
timeout
=
System
.
nanoTime
()
-
nt
;
long
timeout
=
System
.
nanoTime
()
-
nt
;
return
Math
.
round
(
timeout
*
1
E
-
1
/
iterations
)
/
100.0
;
}
private
static
double
runReshufle32
(
int
iterations
,
int
mb
,
long
index
,
long
src
,
long
dest
)
{
var
nt
=
System
.
nanoTime
();
long
nt
=
System
.
nanoTime
();
long
size
=
MB
*
mb
/
4
;
for
(
int
j
=
0
;
j
<
iterations
;
j
++)
{
Vect
.
indexReshuffle32Bit
(
src
,
dest
,
index
,
size
);
}
var
timeout
=
System
.
nanoTime
()
-
nt
;
long
timeout
=
System
.
nanoTime
()
-
nt
;
return
Math
.
round
(
timeout
*
1
E
-
1
/
iterations
)
/
100.0
;
}
private
static
double
runReshufle16
(
int
iterations
,
int
mb
,
long
index
,
long
src
,
long
dest
)
{
var
nt
=
System
.
nanoTime
();
long
nt
=
System
.
nanoTime
();
long
size
=
MB
*
mb
/
2
;
for
(
int
j
=
0
;
j
<
iterations
;
j
++)
{
Vect
.
indexReshuffle16Bit
(
src
,
dest
,
index
,
size
);
}
var
timeout
=
System
.
nanoTime
()
-
nt
;
long
timeout
=
System
.
nanoTime
()
-
nt
;
return
Math
.
round
(
timeout
*
1
E
-
1
/
iterations
)
/
100.0
;
}
}
benchmarks/src/main/java/org/questdb/OooCppBenchmarkSetMemoryVanilla.java
浏览文件 @
7836466a
...
...
@@ -40,7 +40,7 @@ public class OooCppBenchmarkSetMemoryVanilla {
}
private
static
void
testSetMemoryVanillaToCsv
()
{
var
r
=
new
OooCppBenchmarkSetMemoryVanilla
();
OooCppBenchmarkSetMemoryVanilla
r
=
new
OooCppBenchmarkSetMemoryVanilla
();
r
.
mallocBuffer
();
// warmup
...
...
@@ -52,16 +52,16 @@ public class OooCppBenchmarkSetMemoryVanilla {
int
iterations
=
500
;
for
(
int
i
=
1
;
i
<
50
;
i
+=
1
)
{
var
timeout1
=
runDoubleKs
(
iterations
,
i
);
var
timeout2
=
runLongsKs
(
iterations
,
i
,
Long
.
MIN_VALUE
);
var
timeout3
=
runLongsKs
(
iterations
,
i
,
-
1L
);
double
timeout1
=
runDoubleKs
(
iterations
,
i
);
double
timeout2
=
runLongsKs
(
iterations
,
i
,
Long
.
MIN_VALUE
);
double
timeout3
=
runLongsKs
(
iterations
,
i
,
-
1L
);
System
.
out
.
println
(
""
+
i
+
", "
+
timeout1
+
", "
+
timeout2
+
", "
+
timeout3
);
}
r
.
freeBuffer
();
}
private
static
double
runDoubleKs
(
int
iterations
,
int
i
)
{
var
nt
=
System
.
nanoTime
();
long
nt
=
System
.
nanoTime
();
for
(
int
j
=
0
;
j
<
iterations
;
j
++)
{
Vect
.
setMemoryDouble
(
buffer
,
...
...
@@ -69,12 +69,12 @@ public class OooCppBenchmarkSetMemoryVanilla {
i
*
MB
/
Double
.
BYTES
);
}
var
timeout
=
System
.
nanoTime
()
-
nt
;
long
timeout
=
System
.
nanoTime
()
-
nt
;
return
Math
.
round
(
timeout
*
1
E
-
1
/
iterations
)
/
100.0
;
}
private
static
double
runLongsKs
(
int
iterations
,
int
i
,
long
value
)
{
var
nt
=
System
.
nanoTime
();
long
nt
=
System
.
nanoTime
();
for
(
int
j
=
0
;
j
<
iterations
;
j
++)
{
Vect
.
setMemoryLong
(
buffer
,
...
...
@@ -82,7 +82,7 @@ public class OooCppBenchmarkSetMemoryVanilla {
i
*
MB
/
Long
.
BYTES
);
}
var
timeout
=
System
.
nanoTime
()
-
nt
;
long
timeout
=
System
.
nanoTime
()
-
nt
;
return
Math
.
round
(
timeout
*
1
E
-
1
/
iterations
)
/
100.0
;
}
...
...
ci/templates/check-changes-job.yml
浏览文件 @
7836466a
...
...
@@ -11,7 +11,7 @@ jobs:
# No PR - cannot detect changed files, default to true
echo "##vso[task.setvariable variable=SOURCE_CODE_CHANGED;isOutput=true]true"
else
CHANGED_CORE_FILES=$(curl https://api.github.com/repos/questdb/questdb/pulls/$PR_ID/files -s | grep -oP 'filename": "
core
/*\/\K[^.]+')
CHANGED_CORE_FILES=$(curl https://api.github.com/repos/questdb/questdb/pulls/$PR_ID/files -s | grep -oP 'filename": "
(core|benchmarks)
/*\/\K[^.]+')
if [ -z "$CHANGED_CORE_FILES" ]
then
echo "##vso[task.setvariable variable=SOURCE_CODE_CHANGED;isOutput=true]false"
...
...
ci/templates/steps.yml
浏览文件 @
7836466a
...
...
@@ -21,7 +21,7 @@ steps:
-
task
:
Maven@3
displayName
:
"
Compile
with
Maven"
inputs
:
mavenPomFile
:
"
core/
pom.xml"
mavenPomFile
:
"
pom.xml"
mavenOptions
:
"
$(MAVEN_OPTS)"
options
:
"
compile
-DskipTests
-P
build-web-console,use-built-in-nodejs
-Dhttp.keepAlive=false"
jdkVersionOption
:
$(jdk)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录