Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
allocbench
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Fischer
allocbench
Commits
cada16a6
Commit
cada16a6
authored
5 years ago
by
Florian Fischer
Browse files
Options
Downloads
Patches
Plain Diff
readd option to summarize after benchmark run
parent
31a14856
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bench.py
+10
-4
10 additions, 4 deletions
bench.py
summarize.py
+37
-32
37 additions, 32 deletions
summarize.py
with
47 additions
and
36 deletions
bench.py
+
10
−
4
View file @
cada16a6
...
@@ -34,6 +34,8 @@ from src.util import print_status, print_warn, print_error
...
@@ -34,6 +34,8 @@ from src.util import print_status, print_warn, print_error
from
src.util
import
print_info
,
print_info2
,
print_debug
from
src.util
import
print_info
,
print_info2
,
print_debug
from
src.util
import
print_license_and_exit
from
src.util
import
print_license_and_exit
from
summarize
import
summarize
def
epilog
():
def
epilog
():
"""
Run tasks on exit
"""
"""
Run tasks on exit
"""
...
@@ -81,10 +83,7 @@ def main():
...
@@ -81,10 +83,7 @@ def main():
help
=
"
how often the benchmarks run
"
,
help
=
"
how often the benchmarks run
"
,
default
=
3
,
default
=
3
,
type
=
int
)
type
=
int
)
parser
.
add_argument
(
"
-v
"
,
parser
.
add_argument
(
"
-v
"
,
"
--verbose
"
,
help
=
"
more output
"
,
action
=
'
count
'
)
"
--verbose
"
,
help
=
"
more output
"
,
action
=
'
count
'
)
parser
.
add_argument
(
"
-b
"
,
parser
.
add_argument
(
"
-b
"
,
"
--benchmarks
"
,
"
--benchmarks
"
,
help
=
"
benchmarks to run
"
,
help
=
"
benchmarks to run
"
,
...
@@ -103,6 +102,10 @@ def main():
...
@@ -103,6 +102,10 @@ def main():
"
--resultdir
"
,
"
--resultdir
"
,
help
=
"
directory where all results go
"
,
help
=
"
directory where all results go
"
,
type
=
str
)
type
=
str
)
parser
.
add_argument
(
"
-s
"
,
"
--summarize
"
,
help
=
"
create a summary of this run
"
,
action
=
'
store_true
'
)
parser
.
add_argument
(
"
--license
"
,
parser
.
add_argument
(
"
--license
"
,
help
=
"
print license info and exit
"
,
help
=
"
print license info and exit
"
,
action
=
'
store_true
'
)
action
=
'
store_true
'
)
...
@@ -256,6 +259,9 @@ def main():
...
@@ -256,6 +259,9 @@ def main():
print_status
(
"
Cleaning up
"
,
bench
.
name
,
"
...
"
)
print_status
(
"
Cleaning up
"
,
bench
.
name
,
"
...
"
)
bench
.
cleanup
()
bench
.
cleanup
()
if
args
.
summarize
:
summarize
()
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
main
()
main
()
This diff is collapsed.
Click to expand it.
summarize.py
+
37
−
32
View file @
cada16a6
...
@@ -90,41 +90,16 @@ def bench_sum(bench):
...
@@ -90,41 +90,16 @@ def bench_sum(bench):
os
.
chdir
(
"
..
"
)
os
.
chdir
(
"
..
"
)
def
main
():
def
summarize
(
benchmarks
=
None
,
exclude_benchmarks
=
None
):
if
"
--license
"
in
sys
.
argv
:
"""
summarize the benchmarks in the resdir
"""
print_license_and_exit
()
if
"
--version
"
in
sys
.
argv
:
cwd
=
os
.
getcwd
()
print
(
src
.
facter
.
allocbench_version
())
os
.
chdir
(
src
.
globalvars
.
resdir
)
sys
.
exit
(
0
)
parser
=
argparse
.
ArgumentParser
(
description
=
"
Summarize allocbench results in allocator sets
"
)
parser
.
add_argument
(
"
results
"
,
help
=
"
path to results
"
,
type
=
str
)
parser
.
add_argument
(
"
-t
"
,
"
--file-ext
"
,
help
=
"
file extension used for plots
"
,
type
=
str
)
parser
.
add_argument
(
"
--license
"
,
help
=
"
print license info and exit
"
,
action
=
'
store_true
'
)
parser
.
add_argument
(
"
--version
"
,
help
=
"
print version info and exit
"
,
action
=
'
store_true
'
)
parser
.
add_argument
(
"
-b
"
,
"
--benchmarks
"
,
help
=
"
benchmarks to summarize
"
,
nargs
=
'
+
'
)
parser
.
add_argument
(
"
-x
"
,
"
--exclude-benchmarks
"
,
help
=
"
benchmarks to exclude
"
,
nargs
=
'
+
'
)
args
=
parser
.
parse_args
()
if
not
os
.
path
.
isdir
(
args
.
results
):
print_error
(
f
"
{
args
.
results
}
is no directory
"
)
sys
.
exit
(
1
)
if
args
.
file_ext
:
src
.
globalvars
.
summary_file_ext
=
args
.
file_ext
src
.
globalvars
.
resdir
=
args
.
results
os
.
chdir
(
args
.
results
)
# Load facts
src
.
facter
.
load_facts
()
for
benchmark
in
src
.
globalvars
.
benchmarks
:
for
benchmark
in
src
.
globalvars
.
benchmarks
:
if
args
.
benchmarks
and
not
benchmark
in
args
.
benchmarks
:
if
benchmarks
and
not
benchmark
in
benchmarks
:
continue
continue
if
args
.
exclude_benchmarks
and
benchmark
in
args
.
exclude_benchmarks
:
if
exclude_benchmarks
and
benchmark
in
exclude_benchmarks
:
continue
continue
bench_module
=
importlib
.
import_module
(
f
"
src.benchmarks.
{
benchmark
}
"
)
bench_module
=
importlib
.
import_module
(
f
"
src.benchmarks.
{
benchmark
}
"
)
...
@@ -146,6 +121,36 @@ def main():
...
@@ -146,6 +121,36 @@ def main():
except
FileExistsError
as
e
:
except
FileExistsError
as
e
:
print
(
e
)
print
(
e
)
os
.
chdir
(
cwd
)
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
main
()
if
"
--license
"
in
sys
.
argv
:
print_license_and_exit
()
if
"
--version
"
in
sys
.
argv
:
print
(
src
.
facter
.
allocbench_version
())
sys
.
exit
(
0
)
parser
=
argparse
.
ArgumentParser
(
description
=
"
Summarize allocbench results in allocator sets
"
)
parser
.
add_argument
(
"
results
"
,
help
=
"
path to results
"
,
type
=
str
)
parser
.
add_argument
(
"
-t
"
,
"
--file-ext
"
,
help
=
"
file extension used for plots
"
,
type
=
str
)
parser
.
add_argument
(
"
--license
"
,
help
=
"
print license info and exit
"
,
action
=
'
store_true
'
)
parser
.
add_argument
(
"
--version
"
,
help
=
"
print version info and exit
"
,
action
=
'
store_true
'
)
parser
.
add_argument
(
"
-b
"
,
"
--benchmarks
"
,
help
=
"
benchmarks to summarize
"
,
nargs
=
'
+
'
)
parser
.
add_argument
(
"
-x
"
,
"
--exclude-benchmarks
"
,
help
=
"
benchmarks to exclude
"
,
nargs
=
'
+
'
)
args
=
parser
.
parse_args
()
if
args
.
file_ext
:
src
.
globalvars
.
summary_file_ext
=
args
.
file_ext
if
not
os
.
path
.
isdir
(
args
.
results
):
print_error
(
f
"
{
args
.
results
}
is no directory
"
)
sys
.
exit
(
1
)
src
.
globalvars
.
resdir
=
args
.
results
# Load facts
src
.
facter
.
load_facts
(
src
.
globalvars
.
resdir
)
summarize
(
benchmarks
=
args
.
benchmarks
,
exclude_benchmarks
=
args
.
exclude_benchmarks
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment