This redesigns to get a new simpler import format for LNT. With plans to
use the same format for exporting.
- Go for lowercase keys without spaces.
- Drop Run/Info/tag: json itself is a schemaless format so it feels more natural without one. The LNT testsuite type is now determined by the submit URL used, or the '-s' commandline flag on the commandline. Both default to 'nts' if omitted.
- Drop the renaming where we would use different names for import ("info_key") than inside the lnt database. Just expect the lnt database names.
- Simplify the format by flattening Machine/Info into Machine and Run/Info into Run.
Previously:
"Machine": { "name": "mymachine", "Info": { "hardware": "HAL 9000" } }, "Run": { "Start Time": "2017-05-16 21:31:42", "End Time": "2017-05-16 21:31:42", "Info": { "__report_version__": "1", "tag": "nts", "run_order": "123456" } }
Now:
"format_version": "2", "machine": { "name": "mymachine", "hardware": "HAL 9000" }, "run": { "start_time": "2017-05-16 21:31:42", "end_time": "2017-05-16 21:31:42", "llvm_project_revision": "123456" }
- Reorganize test data, so we have 1 record for each tests containing all the metrics.
- Drop the "Info" record for tests (the v4db would refuse to take non-empty Info records anyway).
- Again no renaming of test metrics from "info_key" anymore.
Previously:
"Tests": [ { "Data": [ 7, 42 ], "Name": "nts.SingleSource/Benchmarks/Adobe-C++/functionobjects.compile", "Info": {} }, { "Data": [ 13 ], "Name": "nts.SingleSource/Benchmarks/Adobe-C++/functionobjects.exec", "Info": {} }, { "Data": [ 11 ], "Name": "nts.SingleSource/Benchmarks/Adobe-C++/functionobjects.exec", "Info": {} }, { "Data": [ "49333a87d501b0aea2191830b66b5eec" ], "Name": "nts.SingleSource/Benchmarks/Adobe-C++/functionobjects.hash", "Info": {} } ]
Now:
"test": [ { "name": "SingleSource/Benchmarks/Adobe-C++/functionobjects", "compile_time": [ 7, 42 ], "execution_time": [ 13, 11 ], "hash": "49333a87d501b0aea2191830b66b5eec" } ]
- Implements upgrade logic for submissions in the old format
- I will submit a separate patch to remove the "info_key" columns from the LNT database.
- I will submit a separate patch to have the runtest tests submit in the new format.
- This has been discussed with Chris Matthews to make sure the new REST export APIs will spit out the same format, so users only need to learn one format and it becomes easier to move data around servers.