Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
misc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
misc
Commits
d083da37
Commit
d083da37
authored
Apr 28, 2016
by
Elvis Pranskevichus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for regexps in benchmark selection
parent
45477526
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
run_benchmarks
run_benchmarks
+7
-4
No files found.
run_benchmarks
View file @
d083da37
...
...
@@ -5,6 +5,7 @@ import argparse
import
json
import
os
import
os.path
import
re
import
socket
import
subprocess
import
sys
...
...
@@ -279,7 +280,8 @@ def main():
parser
.
add_argument
(
'--duration'
,
'-D'
,
default
=
30
,
type
=
int
,
help
=
'duration of each benchmark in seconds'
)
parser
.
add_argument
(
'--benchmarks'
,
type
=
str
,
help
=
'comma-separated list of benchmarks to run'
)
help
=
'comma-separated list of benchmarks to run '
+
'(regular expressions are supported)'
)
parser
.
add_argument
(
'--concurrency-levels'
,
type
=
int
,
default
=
[
10
],
nargs
=
'+'
,
help
=
'a list of concurrency levels to use'
)
...
...
@@ -295,9 +297,10 @@ def main():
os
.
mkdir
(
_socket
)
if
args
.
benchmarks
:
benchmarks_to_run
=
args
.
benchmarks
.
split
(
','
)
benchmarks_to_run
=
[
re
.
compile
(
b
)
for
b
in
args
.
benchmarks
.
split
(
','
)]
else
:
benchmarks_to_run
=
{
b
[
'name'
]
for
b
in
benchmarks
}
benchmarks_to_run
=
[
re
.
compile
(
re
.
escape
(
b
[
'name'
]))
for
b
in
benchmarks
]
benchmarks_data
=
[]
...
...
@@ -322,7 +325,7 @@ def main():
'--concurrency={}'
.
format
(
warmup_concurrency
)]
for
benchmark
in
benchmarks
:
if
benchmark
[
'name'
]
not
in
benchmarks_to_run
:
if
not
any
(
b
.
match
(
benchmark
[
'name'
])
for
b
in
benchmarks_to_run
)
:
continue
print
(
benchmark
[
'title'
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment