|
1 | 1 | { |
2 | | - "$schema": "http://json-schema.org/draft-07/schema#", |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
3 | 3 | "title": "ProjectConfig", |
4 | | - "description": "Project-level configuration from codspeed.yaml file\n\nThis configuration provides default options for the run and exec commands. CLI arguments always take precedence over config file values.", |
| 4 | + "description": "Project-level configuration from codspeed.yaml file\n\nThis configuration provides default options for the run and exec commands.\nCLI arguments always take precedence over config file values.", |
5 | 5 | "type": "object", |
6 | 6 | "properties": { |
7 | | - "benchmarks": { |
8 | | - "description": "List of benchmark targets to execute", |
9 | | - "type": [ |
10 | | - "array", |
11 | | - "null" |
12 | | - ], |
13 | | - "items": { |
14 | | - "$ref": "#/definitions/Target" |
15 | | - } |
16 | | - }, |
17 | 7 | "options": { |
18 | 8 | "description": "Default options to apply to all benchmark runs", |
19 | | - "anyOf": [ |
| 9 | + "oneOf": [ |
20 | 10 | { |
21 | | - "$ref": "#/definitions/ProjectOptions" |
| 11 | + "$ref": "#/$defs/ProjectOptions" |
22 | 12 | }, |
23 | 13 | { |
24 | 14 | "type": "null" |
25 | 15 | } |
26 | 16 | ] |
| 17 | + }, |
| 18 | + "benchmarks": { |
| 19 | + "description": "List of benchmark targets to execute", |
| 20 | + "type": [ |
| 21 | + "array", |
| 22 | + "null" |
| 23 | + ], |
| 24 | + "items": { |
| 25 | + "$ref": "#/$defs/Target" |
| 26 | + } |
27 | 27 | } |
28 | 28 | }, |
29 | | - "definitions": { |
| 29 | + "$defs": { |
30 | 30 | "ProjectOptions": { |
31 | 31 | "description": "Root-level options that apply to all benchmark runs unless overridden by CLI", |
32 | 32 | "type": "object", |
33 | 33 | "properties": { |
34 | | - "max-rounds": { |
35 | | - "description": "Maximum number of rounds", |
| 34 | + "working-directory": { |
| 35 | + "description": "Working directory where commands will be executed (relative to config file)", |
36 | 36 | "type": [ |
37 | | - "integer", |
| 37 | + "string", |
38 | 38 | "null" |
39 | | - ], |
40 | | - "format": "uint64", |
41 | | - "minimum": 0.0 |
| 39 | + ] |
42 | 40 | }, |
43 | | - "max-time": { |
44 | | - "description": "Maximum total execution time", |
| 41 | + "warmup-time": { |
| 42 | + "description": "Duration of warmup phase (e.g., \"1s\", \"500ms\")", |
45 | 43 | "type": [ |
46 | 44 | "string", |
47 | 45 | "null" |
48 | 46 | ] |
49 | 47 | }, |
50 | | - "min-rounds": { |
51 | | - "description": "Minimum number of rounds", |
| 48 | + "max-time": { |
| 49 | + "description": "Maximum total execution time", |
52 | 50 | "type": [ |
53 | | - "integer", |
| 51 | + "string", |
54 | 52 | "null" |
55 | | - ], |
56 | | - "format": "uint64", |
57 | | - "minimum": 0.0 |
| 53 | + ] |
58 | 54 | }, |
59 | 55 | "min-time": { |
60 | 56 | "description": "Minimum total execution time", |
|
63 | 59 | "null" |
64 | 60 | ] |
65 | 61 | }, |
66 | | - "warmup-time": { |
67 | | - "description": "Duration of warmup phase (e.g., \"1s\", \"500ms\")", |
| 62 | + "max-rounds": { |
| 63 | + "description": "Maximum number of rounds", |
68 | 64 | "type": [ |
69 | | - "string", |
| 65 | + "integer", |
70 | 66 | "null" |
71 | | - ] |
| 67 | + ], |
| 68 | + "format": "uint64", |
| 69 | + "minimum": 0 |
72 | 70 | }, |
73 | | - "working-directory": { |
74 | | - "description": "Working directory where commands will be executed (relative to config file)", |
| 71 | + "min-rounds": { |
| 72 | + "description": "Minimum number of rounds", |
75 | 73 | "type": [ |
76 | | - "string", |
| 74 | + "integer", |
77 | 75 | "null" |
78 | | - ] |
| 76 | + ], |
| 77 | + "format": "uint64", |
| 78 | + "minimum": 0 |
79 | 79 | } |
80 | 80 | } |
81 | 81 | }, |
82 | 82 | "Target": { |
83 | 83 | "description": "A benchmark target to execute.\n\nEither `exec` or `entrypoint` must be specified (mutually exclusive).", |
84 | 84 | "type": "object", |
85 | 85 | "properties": { |
86 | | - "entrypoint": { |
87 | | - "description": "Command with built-in benchmark harness (mutually exclusive with `exec`)", |
88 | | - "type": [ |
89 | | - "string", |
90 | | - "null" |
91 | | - ] |
92 | | - }, |
93 | | - "exec": { |
94 | | - "description": "Command measured by exec-harness (mutually exclusive with `entrypoint`)", |
| 86 | + "name": { |
| 87 | + "description": "Optional name for this target (display purposes only)", |
95 | 88 | "type": [ |
96 | 89 | "string", |
97 | 90 | "null" |
|
104 | 97 | "null" |
105 | 98 | ] |
106 | 99 | }, |
107 | | - "name": { |
108 | | - "description": "Optional name for this target (display purposes only)", |
109 | | - "type": [ |
110 | | - "string", |
111 | | - "null" |
112 | | - ] |
113 | | - }, |
114 | 100 | "options": { |
115 | 101 | "description": "Target-specific options", |
116 | | - "anyOf": [ |
| 102 | + "oneOf": [ |
117 | 103 | { |
118 | | - "$ref": "#/definitions/TargetOptions" |
| 104 | + "$ref": "#/$defs/TargetOptions" |
119 | 105 | }, |
120 | 106 | { |
121 | 107 | "type": "null" |
122 | 108 | } |
123 | 109 | ] |
124 | 110 | } |
125 | | - } |
| 111 | + }, |
| 112 | + "oneOf": [ |
| 113 | + { |
| 114 | + "description": "Command measured by exec-harness", |
| 115 | + "type": "object", |
| 116 | + "properties": { |
| 117 | + "exec": { |
| 118 | + "type": "string" |
| 119 | + } |
| 120 | + }, |
| 121 | + "required": [ |
| 122 | + "exec" |
| 123 | + ] |
| 124 | + }, |
| 125 | + { |
| 126 | + "description": "Command with built-in benchmark harness", |
| 127 | + "type": "object", |
| 128 | + "properties": { |
| 129 | + "entrypoint": { |
| 130 | + "type": "string" |
| 131 | + } |
| 132 | + }, |
| 133 | + "required": [ |
| 134 | + "entrypoint" |
| 135 | + ] |
| 136 | + } |
| 137 | + ] |
126 | 138 | }, |
127 | 139 | "TargetOptions": { |
128 | 140 | "description": "Walltime execution options matching WalltimeExecutionArgs structure", |
129 | 141 | "type": "object", |
130 | 142 | "properties": { |
131 | | - "max-rounds": { |
132 | | - "description": "Maximum number of rounds", |
| 143 | + "warmup-time": { |
| 144 | + "description": "Duration of warmup phase (e.g., \"1s\", \"500ms\")", |
133 | 145 | "type": [ |
134 | | - "integer", |
| 146 | + "string", |
135 | 147 | "null" |
136 | | - ], |
137 | | - "format": "uint64", |
138 | | - "minimum": 0.0 |
| 148 | + ] |
139 | 149 | }, |
140 | 150 | "max-time": { |
141 | 151 | "description": "Maximum total execution time", |
|
144 | 154 | "null" |
145 | 155 | ] |
146 | 156 | }, |
147 | | - "min-rounds": { |
148 | | - "description": "Minimum number of rounds", |
149 | | - "type": [ |
150 | | - "integer", |
151 | | - "null" |
152 | | - ], |
153 | | - "format": "uint64", |
154 | | - "minimum": 0.0 |
155 | | - }, |
156 | 157 | "min-time": { |
157 | 158 | "description": "Minimum total execution time", |
158 | 159 | "type": [ |
159 | 160 | "string", |
160 | 161 | "null" |
161 | 162 | ] |
162 | 163 | }, |
163 | | - "warmup-time": { |
164 | | - "description": "Duration of warmup phase (e.g., \"1s\", \"500ms\")", |
| 164 | + "max-rounds": { |
| 165 | + "description": "Maximum number of rounds", |
165 | 166 | "type": [ |
166 | | - "string", |
| 167 | + "integer", |
167 | 168 | "null" |
168 | | - ] |
| 169 | + ], |
| 170 | + "format": "uint64", |
| 171 | + "minimum": 0 |
| 172 | + }, |
| 173 | + "min-rounds": { |
| 174 | + "description": "Minimum number of rounds", |
| 175 | + "type": [ |
| 176 | + "integer", |
| 177 | + "null" |
| 178 | + ], |
| 179 | + "format": "uint64", |
| 180 | + "minimum": 0 |
169 | 181 | } |
170 | 182 | } |
171 | 183 | } |
|
0 commit comments