File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -145,13 +145,25 @@ def main():
145
145
encoding = "utf8" ,
146
146
) as baselines_file :
147
147
json_baselines = json .load (baselines_file )
148
+ current_cpus = json_baselines ["hosts" ]["instances" ][args .instance ]["cpus" ]
148
149
cpus = parser .parse ()
149
- json_baselines ["hosts" ]["instances" ][args .instance ] = {"cpus" : cpus }
150
150
151
+ for cpu in cpus :
152
+ model = cpu ["model" ]
153
+ for old_cpu in current_cpus :
154
+ if old_cpu ["model" ] == model :
155
+ old_cpu ["baselines" ] = cpu ["baselines" ]
151
156
baselines_file .truncate (0 )
152
157
baselines_file .seek (0 , 0 )
153
158
json .dump (json_baselines , baselines_file , indent = 4 )
154
159
160
+ # Warn against the fact that not all CPUs pertaining to
161
+ # some arch were updated.
162
+ assert len (cpus ) == len (current_cpus ), (
163
+ "It may be that only a subset of CPU types were updated! "
164
+ "Need to run again! Nevertheless we updated the baselines..."
165
+ )
166
+
155
167
156
168
if __name__ == "__main__" :
157
169
main ()
You can’t perform that action at this time.
0 commit comments