Skip to content

Commit

Permalink
Add utility to validate the run-file
Browse files Browse the repository at this point in the history
And update doc
  • Loading branch information
rafaelfolco committed Oct 5, 2023
1 parent 75467b8 commit d82a89b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
37 changes: 25 additions & 12 deletions util/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@

### JSON Run File
# Crucible run-file

The "all-in-one" JSON run file enables test configuration by using a single
JSON file. Users can specify multi-value parameters, tools, tags, endpoint,
and passthru arguments in JSON format, everything in the same file.
The Crucible run-file, a.k.a. "all-in-one" JSON, is the configuration file
used for running benchmarks. It consolidates all kinds of the settings from
the test run without the need of creating separated files for different
aspects of the test.

When a run-file JSON is used by Crucible command line, it enables test
configuration by using a single JSON file. Users can specify multi-value
parameters, tools, tags, endpoints, and run parameters, all using an unified
JSON format, in one single place.

For more details on the supported format, refer to the JSON [schema](JSON/schema.json).

To validate a run-file, run:
```
python3 validate_run_file.py --json <run-file-json>
```

To use a run-file JSON in Crucible, run:
```
crucible run --from-file <run-file-json>
```

## blockbreaker.py utility

The "blockbreaker.py" utility extracts a configuration block from the
"all-in-one" JSON run file and transforms into a single JSON block or stream.
run-file JSON and transforms into a JSON block or stream output.

## Usage
Usage:
```
# python3 blockbreaker.py --json <json-run-file> --config <config>
python3 blockbreaker.py --json <run-file-json> --config <config>
```
Example:
```
# python3 blockbreaker.py --json run-file.json --config mv-params
python3 blockbreaker.py --json run-file.json --config mv-params
```

For more options and usage run:
```
# python3 blockbreaker.py --help
python3 blockbreaker.py --help
```


2 changes: 1 addition & 1 deletion util/blockbreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def get_mv_params(input_json, name):
return benchmark_blk

def main():
"""Main function of get-json-config.py tool"""
"""Main function of blockbreaker.py tool"""

global args

Expand Down

0 comments on commit d82a89b

Please sign in to comment.