Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
cf76759f
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cf76759f
编写于
9月 26, 1997
作者:
V
Vadim B. Mikheev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Start with performance suite.
上级
561b35e5
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
144 addition
and
0 deletion
+144
-0
src/test/performance/runtests.pl
src/test/performance/runtests.pl
+138
-0
src/test/performance/start-pgsql.sh
src/test/performance/start-pgsql.sh
+6
-0
未找到文件。
src/test/performance/runtests.pl
0 → 100755
浏览文件 @
cf76759f
#!/usr/local/bin/perl
#
# Accepts one argument - DBMS name (pgsql, ...) and initializes
# global variable $TestDBMS with this name.
#
# Where to run tests
$DBNAME
=
'
perftest
';
# This describtion for all DBMS supported by test
# DBMS_name => [FrontEnd, DestroyDB command, CreateDB command]
%DBMS
=
(
'
pgsql
'
=>
["
psql -q -d
$DBNAME
",
"
destroydb
$DBNAME
",
"
createdb
$DBNAME
"]
);
# Tests to run: test' script, test' description, ...
# Test' script is in form
#
# script_name[.ntm][ T]
#
# script_name is name of file in ./sqls
# .ntm means that script will be used for some initialization
# and should not be timed: runtests.pl opens /dev/null as STDERR
# in this case and restore STDERR to result file after script done.
# Script shouldn't notice either he is running for test or for
# initialization purposes.
# T means that all queries in this test (initialization ?) are to be
# executed in SINGLE transaction. In this case global variable $XACTBLOCK
# is not empty string. Otherwise, each query in test is to be executed
# in own transaction ($XACTBLOCK is empty string). In accordance with
# $XACTBLOCK, script is to do DBMS specific preparation before execution
# of queries. (Look at example in sqls/inssimple for MySQL - it gives
# an idea of what can be done for features unsupported by an DBMS.)
#
@perftests
=
(
# It speed up things
'
connection.ntm
',
'
DB connection startup (no timing)
',
# Just connection startup time (echo "" | psql ... - for PgSQL)
'
connection
',
'
DB connection startup
',
'
crtsimple.ntm
',
'
Create SIMPLE table (no timing)
',
# 8192 inserts in single xaction
'
inssimple T
',
'
8192 INSERTs INTO SIMPLE (1 xact)
',
'
drpsimple.ntm
',
'
Drop SIMPLE table (no timing)
',
'
crtsimple.ntm
',
'
Create SIMPLE table (no timing)
',
# 8192 inserts in 8192 xactions
'
inssimple
',
'
8192 INSERTs INTO SIMPLE (8192 xacts)
',
'
vacuum.ntm
',
'
Vacuum (no timing)
',
# Fast (after table filled with data) index creation test
'
crtsimpleidx
',
'
Create INDEX on SIMPLE
',
'
drpsimple.ntm
',
'
Drop SIMPLE table (no timing)
',
'
crtsimple.ntm
',
'
Create SIMPLE table (no timing)
',
'
crtsimpleidx.ntm
',
'
Create INDEX on SIMPLE (no timing)
',
# 8192 inserts in single xaction into table with index
'
inssimple T
',
'
8192 INSERTs INTO SIMPLE with INDEX (1 xact)
',
# 8192 SELECT * FROM simple WHERE justint = <random_key> in single xaction
'
slcsimple T
',
'
8192 random INDEX scans on SIMPLE (1 xact)
',
# SELECT * FROM simple ORDER BY justint
'
orbsimple
',
'
ORDER BY SIMPLE
',
);
#
# It seems that nothing below need to be changed
#
$TestDBMS
=
$ARGV
[
0
];
die
"
Unsupported DBMS
$TestDBMS
\n
"
if
!
exists
$DBMS
{
$TestDBMS
};
$FrontEnd
=
$DBMS
{
$TestDBMS
}[
0
];
$DestroyDB
=
$DBMS
{
$TestDBMS
}[
1
];
$CreateDB
=
$DBMS
{
$TestDBMS
}[
2
];
print
"
(Re)create DataBase
$DBNAME
\n
";
`
$DestroyDB
`;
# Destroy DB
`
$CreateDB
`;
# Create DB
$ResFile
=
"
Results.
$TestDBMS
";
$TmpFile
=
"
Tmp.
$TestDBMS
";
open
(
SAVEOUT
,
"
>&STDOUT
");
open
(
STDOUT
,
"
>/dev/null
")
or
die
;
open
(
SAVEERR
,
"
>&STDERR
");
open
(
STDERR
,
"
>
$TmpFile
")
or
die
;
select
(
STDERR
);
$|
=
1
;
for
(
$i
=
0
;
$i
<=
$#perftests
;
$i
++
)
{
$test
=
$perftests
[
$i
];
(
$test
,
$XACTBLOCK
)
=
split
(
/ /
,
$test
);
$runtest
=
$test
;
if
(
$test
=~
/\.ntm/
)
{
#
# No timing for this queries
#
close
(
STDERR
);
# close $TmpFile
open
(
STDERR
,
"
>/dev/null
")
or
die
;
$runtest
=~
s/\.ntm//
;
}
else
{
close
(
STDOUT
);
open
(
STDOUT
,
"
>&SAVEOUT
");
print
STDOUT
"
\n
Running:
$perftests
[
$i
+1] ...
";
close
(
STDOUT
);
open
(
STDOUT
,
"
>/dev/null
")
or
die
;
select
(
STDERR
);
$|
=
1
;
printf
"
$perftests
[
$i
+1]:
";
}
do
"
sqls/
$runtest
";
# Restore STDERR to $TmpFile
if
(
$test
=~
/\.ntm/
)
{
close
(
STDERR
);
open
(
STDERR
,
"
>>
$TmpFile
")
or
die
;
}
select
(
STDERR
);
$|
=
1
;
$i
++
;
}
close
(
STDERR
);
open
(
STDERR
,
"
>&SAVEERR
");
open
(
TMPF
,
"
<
$TmpFile
")
or
die
;
open
(
RESF
,
"
>
$ResFile
")
or
die
;
while
(
<
TMPF
>
)
{
$str
=
$_
;
(
$test
,
$rtime
)
=
split
(
/:/
,
$str
);
(
$tmp
,
$rtime
,
$rest
)
=
split
(
/[ ]+/
,
$rtime
);
print
RESF
"
$test
:
$rtime
\n
";
}
src/test/performance/start-pgsql.sh
0 → 100755
浏览文件 @
cf76759f
#!/bin/sh
# Please choose amount of sort memory (-S XXX) as appropriate
# for your system: more is better, but swapping breaks performance!
exec
postmaster
-B
256
'-o -S 2048'
-S
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录