mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
test_stats, gather data after running all tests
add option to dump stats as json to file Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0a16dc6c47
commit
a0371bdfe1
@@ -164,6 +164,8 @@ int main(int argc, char **argv) {
|
||||
bool enableAlarm = true;
|
||||
bool setupFeatureTableAndWorkaroundTable = testMode == TestMode::AubTests ? true : false;
|
||||
bool showTestStats = false;
|
||||
bool dumpTestStats = false;
|
||||
std::string dumpTestStatsFileName = "";
|
||||
|
||||
auto sysmanUltsEnableEnv = getenv("NEO_L0_SYSMAN_ULTS_ENABLE");
|
||||
if (sysmanUltsEnableEnv != nullptr) {
|
||||
@@ -266,14 +268,13 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
} else if (!strcmp("--show_test_stats", argv[i])) {
|
||||
showTestStats = true;
|
||||
} else if (!strcmp("--dump_test_stats", argv[i])) {
|
||||
dumpTestStats = true;
|
||||
++i;
|
||||
dumpTestStatsFileName = std::string(argv[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (showTestStats) {
|
||||
std::cout << getTestStats() << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
productFamily = hwInfoForTests.platform.eProductFamily;
|
||||
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
|
||||
uint32_t threadsPerEu = hwInfoConfigFactory[productFamily]->threadsPerEu;
|
||||
@@ -391,5 +392,16 @@ int main(int argc, char **argv) {
|
||||
|
||||
auto retVal = RUN_ALL_TESTS();
|
||||
|
||||
if (showTestStats) {
|
||||
std::cout << getTestStats() << std::endl;
|
||||
}
|
||||
|
||||
if (dumpTestStats) {
|
||||
std::ofstream dumpTestStatsFile;
|
||||
dumpTestStatsFile.open(dumpTestStatsFileName);
|
||||
dumpTestStatsFile << getTestStatsJson();
|
||||
dumpTestStatsFile.close();
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user