|
6 | 6 | * Copyright (c) 2011-2022 Digital Bazaar, Inc. All rights reserved. |
7 | 7 | */ |
8 | 8 |
|
| 9 | +/* eslint-disable quote-props */ |
| 10 | +const _benchmarkContext = { |
| 11 | + 'jldb': 'http://json-ld.org/benchmarks/vocab#', |
| 12 | + 'rdfs': 'http://www.w3.org/2000/01/rdf-schema#', |
| 13 | + 'xsd': 'http://www.w3.org/2001/XMLSchema#', |
| 14 | + |
| 15 | + // environment description |
| 16 | + 'jldb:Environment': {'@type': '@id'}, |
| 17 | + |
| 18 | + // per environment |
| 19 | + // label |
| 20 | + // ex: 'Setup 1' (for reports) |
| 21 | + 'jldb:label': {'@type': 'xsd:string'}, |
| 22 | + // architecture type |
| 23 | + // ex: x86 |
| 24 | + 'jldb:arch': {'@type': 'xsd:string'}, |
| 25 | + // cpu model description (may show multiple cpus) |
| 26 | + // ex: 'Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz' |
| 27 | + 'jldb:cpu': {'@type': 'xsd:string'}, |
| 28 | + // count of cpus, may not be uniform, just informative |
| 29 | + 'jldb:cpuCount': {'@type': 'xsd:integer'}, |
| 30 | + // platform name |
| 31 | + // ex: linux |
| 32 | + 'jldb:platform': {'@type': 'xsd:string'}, |
| 33 | + // runtime name |
| 34 | + // ex: Node.js, Chromium, Ruby |
| 35 | + 'jldb:runtime': {'@type': 'xsd:string'}, |
| 36 | + // runtime version |
| 37 | + // ex: v14.19.0 |
| 38 | + 'jldb:runtimeVersion': {'@type': 'xsd:string'}, |
| 39 | + // arbitrary comment |
| 40 | + 'jldb:comment': 'rdfs:comment', |
| 41 | + |
| 42 | + // benchmark result |
| 43 | + 'jldb:BenchmarkResult': {'@type': '@id'}, |
| 44 | + |
| 45 | + // use in earl:Assertion, type jldb:BenchmarkResult |
| 46 | + 'jldb:result': {'@type': '@id'}, |
| 47 | + |
| 48 | + // per BenchmarkResult |
| 49 | + 'jldb:environment': {'@type': '@id'}, |
| 50 | + 'jldb:hz': {'@type': 'xsd:float'}, |
| 51 | + 'jldb:rme': {'@type': 'xsd:float'} |
| 52 | +}; |
| 53 | +/* eslint-enable quote-props */ |
| 54 | + |
9 | 55 | /** |
10 | 56 | * EARL Reporter |
11 | 57 | */ |
@@ -154,50 +200,4 @@ class EarlReport { |
154 | 200 | } |
155 | 201 | } |
156 | 202 |
|
157 | | -/* eslint-disable quote-props */ |
158 | | -const _benchmarkContext = { |
159 | | - 'jldb': 'http://json-ld.org/benchmarks/vocab#', |
160 | | - 'rdfs': 'http://www.w3.org/2000/01/rdf-schema#', |
161 | | - 'xsd': 'http://www.w3.org/2001/XMLSchema#', |
162 | | - |
163 | | - // environment description |
164 | | - 'jldb:Environment': {'@type': '@id'}, |
165 | | - |
166 | | - // per environment |
167 | | - // label |
168 | | - // ex: 'Setup 1' (for reports) |
169 | | - 'jldb:label': {'@type': 'xsd:string'}, |
170 | | - // architecture type |
171 | | - // ex: x86 |
172 | | - 'jldb:arch': {'@type': 'xsd:string'}, |
173 | | - // cpu model description (may show multiple cpus) |
174 | | - // ex: 'Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz' |
175 | | - 'jldb:cpu': {'@type': 'xsd:string'}, |
176 | | - // count of cpus, may not be uniform, just informative |
177 | | - 'jldb:cpuCount': {'@type': 'xsd:integer'}, |
178 | | - // platform name |
179 | | - // ex: linux |
180 | | - 'jldb:platform': {'@type': 'xsd:string'}, |
181 | | - // runtime name |
182 | | - // ex: Node.js, Chromium, Ruby |
183 | | - 'jldb:runtime': {'@type': 'xsd:string'}, |
184 | | - // runtime version |
185 | | - // ex: v14.19.0 |
186 | | - 'jldb:runtimeVersion': {'@type': 'xsd:string'}, |
187 | | - // arbitrary comment |
188 | | - 'jldb:comment': 'rdfs:comment', |
189 | | - |
190 | | - // benchmark result |
191 | | - 'jldb:BenchmarkResult': {'@type': '@id'}, |
192 | | - |
193 | | - // use in earl:Assertion, type jldb:BenchmarkResult |
194 | | - 'jldb:result': {'@type': '@id'}, |
195 | | - |
196 | | - // per BenchmarkResult |
197 | | - 'jldb:environment': {'@type': '@id'}, |
198 | | - 'jldb:hz': {'@type': 'xsd:float'}, |
199 | | - 'jldb:rme': {'@type': 'xsd:float'} |
200 | | -}; |
201 | | -/* eslint-enable quote-props */ |
202 | | - |
203 | 203 | module.exports = EarlReport; |
0 commit comments