Update validate.py (#727)

Tá an tiomantas seo le fáil i:
Ammar ELWazir
2024-04-02 01:59:33 -05:00
tiomanta ag GitHub
tuismitheoir 2905fb5e95
tiomantas c45573f559
+3 -20
Féach ar an gComhad
@@ -30,27 +30,10 @@ def test_counter_values(input_data):
scaling_factor = 64 / itr["wave_front_size"]
break
scaling_factor = 64 / itr["wave_front_size"]
for itr in data["rocprofiler-sdk-json-tool"]["buffer_records"][
"counter_collection"
]:
value = itr["counter_value"]
assert int(round(value, 0)) == int(round(1 * scaling_factor, 0)), (
f"Failure on agent "
f"{str(itr)} expected {1 * scaling_factor} but got {value} "
f"Debug Info:\n {str(data)}"
)
for itr in data["rocprofiler-sdk-json-tool"]["buffer_records"][
"counter_collection"
]:
for itr in data["rocprofiler-sdk-json-tool"]["buffer_records"]["counter_collection"]:
value = itr["counter_value"]
assert int(round(value, 0)) == int(round(1 * scaling_factor, 0)), (
f"Failure on agent "
f"{str(itr)} expected {1 * scaling_factor} but got {value} "
f"Debug Info:\n {str(data)}"
)
assert int(round(value, 0)) == int(round(1 * scaling_factor, 0)), str(data)
if __name__ == "__main__":
exit_code = pytest.main(["-x", __file__] + sys.argv[1:])