k4bench.plugin.event_schema¶
k4bench.plugin.event_schema ¶
Version contract of the event timing plugin's <label>_events.json.
A file without schema_version is the legacy unversioned event format and
is read as before. Both the analysis loader and the runner validate through
:func:validate_event_schema, so a new version is accepted or refused in one
place.
validate_event_schema ¶
Raise ValueError unless raw is an event file this k4bench can read.
raw is the parsed JSON document; a root that is not an object is refused.
An absent schema_version is accepted as the legacy unversioned format.
A present one must be a plain int (bool and float are refused)
between 1 and :data:EVENT_SCHEMA_VERSION; a newer version is refused
rather than parsed as a format it may not be.