fix: correct latency observed between device and metric timestamps

Related-To: NEO-15820

Signed-off-by: shubham kumar <shubham.kumar@intel.com>
This commit is contained in:
shubham kumar
2025-09-08 07:03:32 +00:00
committed by Compute-Runtime-Automation
parent 76b93ca9aa
commit d3bef2223a
3 changed files with 22 additions and 16 deletions

View File

@@ -860,7 +860,7 @@ TEST_F(MetricEnumerationTest, GivenEnumerationIsSuccessfulWhenReadingMetricsFreq
EXPECT_NE(metricTimestamp, 0UL);
}
TEST_F(MetricEnumerationTest, GivenEnumerationIsSuccessfulWhenFailingToReadMetricsOrDeviceTimestampsThenValuesAreZero) {
TEST_F(MetricEnumerationTest, GivenEnumerationIsSuccessfulWhenFailingToReadDeviceTimestampsOrMetricFrequencyThenValuesAreZero) {
// Metrics Discovery device.
metricsDeviceParams.ConcurrentGroupsCount = 1;
@@ -922,7 +922,7 @@ TEST_F(MetricEnumerationTest, GivenEnumerationIsSuccessfulWhenFailingToReadMetri
ze_bool_t synchronizedWithHost = true;
uint64_t globalTimestamp = 1;
uint64_t metricTimestamp = 1;
metricsDevice.forceGetGpuCpuTimestampsFail = true;
metricsDevice.forceGetSymbolByNameFail = true;
EXPECT_EQ(L0::zetMetricGroupGetGlobalTimestampsExp(metricGroupHandle, synchronizedWithHost, &globalTimestamp, &metricTimestamp), ZE_RESULT_ERROR_NOT_AVAILABLE);
EXPECT_EQ(globalTimestamp, 0UL);
@@ -931,6 +931,7 @@ TEST_F(MetricEnumerationTest, GivenEnumerationIsSuccessfulWhenFailingToReadMetri
globalTimestamp = 1;
metricTimestamp = 1;
metricsDevice.forceGetGpuCpuTimestampsFail = true;
neoDevice->setOSTime(new FalseGpuCpuTime());
EXPECT_EQ(L0::zetMetricGroupGetGlobalTimestampsExp(metricGroupHandle, synchronizedWithHost, &globalTimestamp, &metricTimestamp), ZE_RESULT_ERROR_DEVICE_LOST);
EXPECT_EQ(globalTimestamp, 0UL);