Skip to content

Commit

Permalink
Merge pull request pmem#1180 from ldorau/tools-add-configuration-comm…
Browse files Browse the repository at this point in the history
…on-target-and-bios.excerpt-to-the-preamble

tools: add configuration common, target and bios.excerpt to the preamble
  • Loading branch information
Jan Michalski committed Jul 30, 2021
2 parents 0bb3f31 + b0cc071 commit cf24455
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 4 deletions.
65 changes: 65 additions & 0 deletions tools/perf/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,63 @@
"ref": "2021_04_21_CLX",
"authors": ["Name-1 (E-mail-1)", "Name-2 (E-mail-2)", "Name-3 (E-mail-3)"],
"configuration" : {
"common": {
"Server Platform" : [
"The name of the platform"
],
"CPU" : [
"Producer® Name A.BGHz"
],
"Memory" : [
"Cx DGB Producer® Model, DDRE, FMT/s", "Total of JGB DRAM"
],
"Persistent Memory" : [
"Gx HGB Producer® Model Persistent Memory, IMT/s",
"Total of KGB PMem",
"XGiB Device DAX / FileSystem DAX file on Xx Interleaved region"
],
"RDMA-capable NIC" : [
"XGbps Producer® Name MTU Y Protocol"
],
"Storage" : [
"XGB Producer® Name"
],
"Operating System" : [
"Distribution Linux L.M"
],
"BIOS" : [
"serial_number"
],
"Linux kernel version" : [
"version-patch.architecture"
],
"librpma" : [
"major.minor-patch-hash"
],
"libibverbs" : [
"major.minor-patch-hash"
],
"libpmem" : [
"major.minor-patch-hash"
],
"FIO version" : [
"major.minor-patch-hash"
],
"rdma-core" : [
"major.minor-patch-hash"
]
},
"target" : {
"Repository" : [
"https://github.com/domain/url"
],
"Version" : [
"hash"
],
"Applied procedure" : [
"[Details](https://domain/url)"
]
},
"bios": {
"settings" : {
"Repository" : [
Expand All @@ -56,6 +113,14 @@
"Applied procedure" : [
"[Details](https://domain/url)"
]
},
"excerpt" : {
"Key1" : [
"value1"
],
"Key2" : [
"value2"
]
}
}
}
Expand Down
19 changes: 15 additions & 4 deletions tools/perf/lib/Report.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,24 @@ def _load_parts(self, loader, env, bench):
# XXX type validation is missing
if 'configuration' not in variables:
raise SyntaxError("config.json misses ['report']['configuration'] entry")
elif 'bios' not in variables['configuration']:
raise SyntaxError("config.json misses ['report']['configuration']['bios'] entry")
elif 'settings' not in variables['configuration']['bios']:
raise SyntaxError("config.json misses ['report']['configuration']['bios']['settings'] entry")
else:
if 'common' not in variables['configuration']:
raise SyntaxError("config.json misses ['report']['configuration']['common'] entry")
if 'target' not in variables['configuration']:
raise SyntaxError("config.json misses ['report']['configuration']['target'] entry")
if 'bios' not in variables['configuration']:
raise SyntaxError("config.json misses ['report']['configuration']['bios'] entry")
else:
if 'settings' not in variables['configuration']['bios']:
raise SyntaxError("config.json misses ['report']['configuration']['bios']['settings'] entry")
if 'excerpt' not in variables['configuration']['bios']:
raise SyntaxError("config.json misses ['report']['configuration']['bios']['excerpt'] entry")

# the only correct type is 'kvtable'
variables['configuration']['common']['type'] = 'kvtable'
variables['configuration']['target']['type'] = 'kvtable'
variables['configuration']['bios']['settings']['type'] = 'kvtable'
variables['configuration']['bios']['excerpt']['type'] = 'kvtable'

preamble = Part(loader, env, 'preamble')
preamble.process_variables_level(variables, {})
Expand Down

0 comments on commit cf24455

Please sign in to comment.