Skip to content

NVBench --jsonbin should generate binary sidecar filenames relative to path of JSON file #404

Description

@oleksandr-pavlyk

--jsonbin writes binary sidecar files for sample times and sample frequencies next to the JSON output.

However, the filename fields stored in the JSON currently use the same path that NVBench used when writing the sidecar files.

For example:

./benchmark --jsonbin ../../../perf_data/result.json

writes sidecars under:

../../../perf_data/result.json-bin/
../../../perf_data/result.json-freqs-bin/

and records filenames such as:

../../../perf_data/result.json-bin/0.bin

Those paths are relative to the benchmark process working directory, not to the JSON file. This makes the JSON harder to consume from another
working directory and less relocatable with its sidecar directories.

The JSON should instead record sidecar filenames relative to the JSON file directory:

result.json-bin/0.bin
result.json-freqs-bin/0.bin

The files should still be written next to the JSON output file. Only the serialized filename value should change.

This would let consumers resolve sidecar files using:

dirname(result.json) / filename

and make a JSON file plus its *-bin directories portable as a unit.

Metadata

Metadata

Labels

P0: must haveAbsolutely necessary. Critical issue, major blocker, etc.type: bug: functionalDoes not work as intended.

Type

Fields

No fields configured for Bug.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions