Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
physics_benchmarks
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
physics_benchmarks
Commits
4c57c003
Commit
4c57c003
authored
4 years ago
by
Sylvester Joosten
Browse files
Options
Downloads
Patches
Plain Diff
fixed mistake with capitalization update
parent
ff71cd77
No related branches found
No related tags found
1 merge request
!17
Aggregate benchmark results
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
util/benchmark.hh
+4
-4
4 additions, 4 deletions
util/benchmark.hh
util/collect_tests.py
+18
-0
18 additions, 0 deletions
util/collect_tests.py
with
22 additions
and
4 deletions
util/benchmark.hh
+
4
−
4
View file @
4c57c003
...
@@ -49,9 +49,9 @@
...
@@ -49,9 +49,9 @@
// library
// library
namespace
eic
::
util
{
namespace
eic
::
util
{
struct
TestDefinitionError
:
e
xception
{
struct
TestDefinitionError
:
E
xception
{
TestDefinitionError
(
std
::
string_view
msg
)
TestDefinitionError
(
std
::
string_view
msg
)
:
e
xception
(
msg
,
"test_definition_error"
)
{}
:
E
xception
(
msg
,
"test_definition_error"
)
{}
};
};
// Wrapper for our test data json, with three methods to set the status
// Wrapper for our test data json, with three methods to set the status
...
@@ -68,7 +68,7 @@ struct TestDefinitionError : exception {
...
@@ -68,7 +68,7 @@ struct TestDefinitionError : exception {
// - weight: Weight for this test (this is defaulted to 1.0 if not specified)
// - weight: Weight for this test (this is defaulted to 1.0 if not specified)
// - result: pass/fail/error
// - result: pass/fail/error
struct
Test
{
struct
Test
{
t
est
(
nlohmann
::
json
definition
)
:
json
{
std
::
move
(
definition
)}
{
T
est
(
nlohmann
::
json
definition
)
:
json
{
std
::
move
(
definition
)}
{
// initialize with error (as we don't have a value yet)
// initialize with error (as we don't have a value yet)
error
();
error
();
// Check that all required fields are present
// Check that all required fields are present
...
@@ -101,7 +101,7 @@ private:
...
@@ -101,7 +101,7 @@ private:
void
write_test
(
const
std
::
vector
<
test
>&
data
,
const
std
::
string
&
fname
)
{
void
write_test
(
const
std
::
vector
<
test
>&
data
,
const
std
::
string
&
fname
)
{
nlohmann
::
json
test
;
nlohmann
::
json
test
;
for
(
auto
&
entry
:
data
)
{
for
(
auto
&
entry
:
data
)
{
test
.
push_back
(
entry
.
json
);
test
[
"test"
]
.
push_back
(
entry
.
json
);
}
}
std
::
cout
<<
fmt
::
format
(
"Writing test data to {}
\n
"
,
fname
);
std
::
cout
<<
fmt
::
format
(
"Writing test data to {}
\n
"
,
fname
);
std
::
ofstream
output_file
(
fname
);
std
::
ofstream
output_file
(
fname
);
...
...
This diff is collapsed.
Click to expand it.
util/collect_tests.py
0 → 100644
+
18
−
0
View file @
4c57c003
#!/usr/bin/env python3
"""
Collect the json files from individual benchmark tests into
a larger json file that combines all benchmark information,
and do additional accounting for the benchmark.
Tests results are expected to have the following file name and directory
structure:
results/<BENCHMARK_NAME>/<SOME_NAME>.json
or
results/<BENCHMARK_NAME>/subdirectory/<SOME_NAME>.json
Internally, we will look for the
"
tests
"
keyword in each of these
files to identify them as benchmark components.
"""
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