Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
3f6cccaa
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3f6cccaa
编写于
6月 13, 2017
作者:
A
alexey-milovidov
提交者:
GitHub
6月 13, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #834 from luc1ph3r/Add-performance-test
Add performance test
上级
e8a5804e
52b5f18d
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
1593 addition
and
16 deletion
+1593
-16
dbms/src/Client/CMakeLists.txt
dbms/src/Client/CMakeLists.txt
+3
-0
dbms/src/Client/PerformanceTest.cpp
dbms/src/Client/PerformanceTest.cpp
+1556
-0
dbms/src/Client/profiles.xml
dbms/src/Client/profiles.xml
+7
-0
dbms/src/IO/ReadHelpers.cpp
dbms/src/IO/ReadHelpers.cpp
+18
-10
dbms/src/IO/ReadHelpers.h
dbms/src/IO/ReadHelpers.h
+4
-4
dbms/src/Server/CMakeLists.txt
dbms/src/Server/CMakeLists.txt
+2
-1
dbms/src/Server/main.cpp
dbms/src/Server/main.cpp
+3
-1
未找到文件。
dbms/src/Client/CMakeLists.txt
浏览文件 @
3f6cccaa
...
...
@@ -5,6 +5,9 @@ install (FILES config.xml DESTINATION ${CLICKHOUSE_ETC_DIR}/clickhouse-client CO
add_library
(
clickhouse-benchmark Benchmark.cpp
)
target_link_libraries
(
clickhouse-benchmark dbms
${
Boost_PROGRAM_OPTIONS_LIBRARY
}
)
add_library
(
clickhouse-performance-test PerformanceTest.cpp
)
target_link_libraries
(
clickhouse-performance-test dbms
${
Boost_PROGRAM_OPTIONS_LIBRARY
}
)
if
(
ENABLE_TESTS
)
add_subdirectory
(
tests
)
endif
()
dbms/src/Client/PerformanceTest.cpp
0 → 100644
浏览文件 @
3f6cccaa
此差异已折叠。
点击以展开。
dbms/src/Client/profiles.xml
0 → 100644
浏览文件 @
3f6cccaa
<?xml version="1.0"?>
<profiles>
<default></default>
<single_thread>
<max_threads>
1
</max_threads>
</single_thread>
</profiles>
\ No newline at end of file
dbms/src/IO/ReadHelpers.cpp
浏览文件 @
3f6cccaa
...
...
@@ -133,16 +133,22 @@ inline void appendToStringOrVector(PaddedPODArray<UInt8> & s, const char * begin
template
<
typename
Vector
>
void
readStringInto
(
Vector
&
s
,
ReadBuffer
&
buf
)
void
readStringInto
(
Vector
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
)
{
while
(
!
buf
.
eof
())
{
size_t
bytes
=
0
;
bool
whitespace
=
false
;
for
(;
buf
.
position
()
+
bytes
!=
buf
.
buffer
().
end
();
++
bytes
)
if
(
buf
.
position
()[
bytes
]
==
'\t'
||
buf
.
position
()[
bytes
]
==
'\n'
)
{
whitespace
=
true
;
break
;
}
appendToStringOrVector
(
s
,
buf
.
position
(),
buf
.
position
()
+
bytes
);
if
(
skip_whitespace
&&
whitespace
)
bytes
+=
1
;
buf
.
position
()
+=
bytes
;
if
(
buf
.
hasPendingData
())
...
...
@@ -150,13 +156,13 @@ void readStringInto(Vector & s, ReadBuffer & buf)
}
}
void
readString
(
String
&
s
,
ReadBuffer
&
buf
)
void
readString
(
String
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
)
{
s
.
clear
();
readStringInto
(
s
,
buf
);
readStringInto
(
s
,
buf
,
skip_whitespace
);
}
template
void
readStringInto
<
PaddedPODArray
<
UInt8
>
>
(
PaddedPODArray
<
UInt8
>
&
s
,
ReadBuffer
&
buf
);
template
void
readStringInto
<
PaddedPODArray
<
UInt8
>
>
(
PaddedPODArray
<
UInt8
>
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
);
template
<
typename
Vector
>
...
...
@@ -327,7 +333,7 @@ static void parseJSONEscapeSequence(Vector & s, ReadBuffer & buf)
template
<
typename
Vector
>
void
readEscapedStringInto
(
Vector
&
s
,
ReadBuffer
&
buf
)
void
readEscapedStringInto
(
Vector
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
)
{
while
(
!
buf
.
eof
())
{
...
...
@@ -339,22 +345,24 @@ void readEscapedStringInto(Vector & s, ReadBuffer & buf)
if
(
!
buf
.
hasPendingData
())
continue
;
if
(
*
buf
.
position
()
==
'\t'
||
*
buf
.
position
()
==
'\n'
)
if
(
*
buf
.
position
()
==
'\t'
||
*
buf
.
position
()
==
'\n'
)
{
buf
.
position
()
+=
1
;
return
;
}
if
(
*
buf
.
position
()
==
'\\'
)
parseComplexEscapeSequence
(
s
,
buf
);
}
}
void
readEscapedString
(
String
&
s
,
ReadBuffer
&
buf
)
void
readEscapedString
(
String
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
)
{
s
.
clear
();
readEscapedStringInto
(
s
,
buf
);
readEscapedStringInto
(
s
,
buf
,
skip_whitespace
);
}
template
void
readEscapedStringInto
<
PaddedPODArray
<
UInt8
>
>
(
PaddedPODArray
<
UInt8
>
&
s
,
ReadBuffer
&
buf
);
template
void
readEscapedStringInto
<
NullSink
>(
NullSink
&
s
,
ReadBuffer
&
buf
);
template
void
readEscapedStringInto
<
PaddedPODArray
<
UInt8
>
>
(
PaddedPODArray
<
UInt8
>
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
);
template
void
readEscapedStringInto
<
NullSink
>(
NullSink
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
);
template
<
char
quote
,
typename
Vector
>
...
...
dbms/src/IO/ReadHelpers.h
浏览文件 @
3f6cccaa
...
...
@@ -491,9 +491,9 @@ inline void readFloatText(T & x, ReadBuffer & buf)
}
/// rough; all until '\n' or '\t'
void
readString
(
String
&
s
,
ReadBuffer
&
buf
);
void
readString
(
String
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
=
false
);
void
readEscapedString
(
String
&
s
,
ReadBuffer
&
buf
);
void
readEscapedString
(
String
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
=
false
);
void
readQuotedString
(
String
&
s
,
ReadBuffer
&
buf
);
...
...
@@ -522,10 +522,10 @@ void readCSVString(String & s, ReadBuffer & buf, const char delimiter = ',');
/// Read and append result to array of characters.
template
<
typename
Vector
>
void
readStringInto
(
Vector
&
s
,
ReadBuffer
&
buf
);
void
readStringInto
(
Vector
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
=
false
);
template
<
typename
Vector
>
void
readEscapedStringInto
(
Vector
&
s
,
ReadBuffer
&
buf
);
void
readEscapedStringInto
(
Vector
&
s
,
ReadBuffer
&
buf
,
bool
skip_whitespace
=
false
);
template
<
typename
Vector
>
void
readQuotedStringInto
(
Vector
&
s
,
ReadBuffer
&
buf
);
...
...
dbms/src/Server/CMakeLists.txt
浏览文件 @
3f6cccaa
...
...
@@ -22,9 +22,9 @@ target_link_libraries(clickhouse
clickhouse-client
clickhouse-local
clickhouse-benchmark
clickhouse-performance-test
clickhouse-extract-from-config
)
INSTALL
(
TARGETS clickhouse RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
COMPONENT clickhouse
)
# make symbolic links to concrete clickhouse applications
macro
(
install_symlink_to_clickhouse app
)
INSTALL
(
CODE
"execute_process(COMMAND ln -sf clickhouse
${
app
}
WORKING_DIRECTORY
\"\$
ENV{DESTDIR}
${
CMAKE_INSTALL_FULL_BINDIR
}
\"
)"
COMPONENT
${
app
}
)
...
...
@@ -34,6 +34,7 @@ install_symlink_to_clickhouse(clickhouse-server)
install_symlink_to_clickhouse
(
clickhouse-client
)
install_symlink_to_clickhouse
(
clickhouse-local
)
install_symlink_to_clickhouse
(
clickhouse-benchmark
)
install_symlink_to_clickhouse
(
clickhouse-performance-test
)
INSTALL
(
FILES config.xml users.xml
...
...
dbms/src/Server/main.cpp
浏览文件 @
3f6cccaa
...
...
@@ -11,9 +11,9 @@ int mainEntryClickHouseServer(int argc, char ** argv);
int
mainEntryClickHouseClient
(
int
argc
,
char
**
argv
);
int
mainEntryClickHouseLocal
(
int
argc
,
char
**
argv
);
int
mainEntryClickHouseBenchmark
(
int
argc
,
char
**
argv
);
int
mainEntryClickhousePerformanceTest
(
int
argc
,
char
**
argv
);
int
mainEntryClickHouseExtractFromConfig
(
int
argc
,
char
**
argv
);
static
bool
isClickhouseApp
(
const
std
::
string
&
app_suffix
,
std
::
vector
<
char
*>
&
argv
)
{
std
::
string
arg_mode_app
=
"--"
+
app_suffix
;
...
...
@@ -54,6 +54,8 @@ int main(int argc_, char ** argv_)
main_func
=
mainEntryClickHouseBenchmark
;
else
if
(
isClickhouseApp
(
"server"
,
argv
))
/// --server arg should be cut
main_func
=
mainEntryClickHouseServer
;
else
if
(
isClickhouseApp
(
"performance-test"
,
argv
))
main_func
=
mainEntryClickhousePerformanceTest
;
else
if
(
isClickhouseApp
(
"extract-from-config"
,
argv
))
main_func
=
mainEntryClickHouseExtractFromConfig
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录