c7407d0a9f
* Adding list-metrics * cmake formatting (cmake-format) (#587) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * source formatting (clang-format v11) (#586) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * Fixing issues with validation tests * python formatting (black) (#588) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * source formatting (clang-format v11) (#589) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * cmake formatting (cmake-format) (#590) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * Update conftest.py * Update validate.py * python formatting (black) (#591) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * python formatting (black) (#592) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * Checking if agent-id in validate.py * Fixing list metrics execute test * cmake formatting (cmake-format) (#593) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * Fixing CI failure * cmake formatting (cmake-format) (#594) Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> * Review Comments * Update source/bin/rocprofv3 Support -L shorthand for --list-metrics --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
import pandas as pd
|
|
import sys
|
|
import pytest
|
|
|
|
|
|
def test_validate_list_basic_metrics(basic_metrics_input_data):
|
|
for row in basic_metrics_input_data:
|
|
assert row["Agent-id"].isdigit() == True
|
|
assert row["Name"] != ""
|
|
assert row["Description"] != ""
|
|
assert row["Block"] != ""
|
|
assert row["Dimensions"] != ""
|
|
if row["Name"] == "SQ_WAVES":
|
|
row[
|
|
"Description"
|
|
] == "Count number of waves sent to SQs. (per-simd, emulated, global)"
|
|
row["Block"] == "SQ"
|
|
|
|
|
|
def test_validate_list_derived_metrics(derived_metrics_input_data):
|
|
for row in derived_metrics_input_data:
|
|
assert row["Agent-id"].isdigit() == True
|
|
assert row["Name"] != ""
|
|
assert row["Description"] != ""
|
|
assert row["Expression"] != ""
|
|
assert row["Dimensions"] != ""
|
|
if row["Name"] == "TA_BUSY_min":
|
|
row["Description"] == "TA block is busy. Min over TA instances."
|
|
row["Expression"] == "reduce(TA_TA_BUSY,min)"
|
|
|
|
|
|
if __name__ == "__main__":
|
|
exit_code = pytest.main(["-x", __file__] + sys.argv[1:])
|
|
sys.exit(exit_code)
|