mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
Revert "feature: Add support for OA buffer overflow"
This reverts commit b2d25174fb.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
24682e702b
commit
cb0b69a1cb
@@ -321,30 +321,6 @@ ze_result_t MetricEnumeration::cacheMetricInformation() {
|
||||
|
||||
// 2. Find "OA" concurrent group.
|
||||
if (strcmp(pConcurrentGroupParams->SymbolName, oaConcurrentGroupName) == 0) {
|
||||
|
||||
// Find the oaBufferOverflowInformation and store in member variable pOaBufferOverflowInformation
|
||||
const uint32_t measurementInfoCount = pConcurrentGroupParams->IoMeasurementInformationCount;
|
||||
MetricsDiscovery::IInformationLatest *oaBufferOverflowInformation = nullptr;
|
||||
|
||||
for (uint32_t i = 0; i < measurementInfoCount; ++i) {
|
||||
MetricsDiscovery::IInformationLatest *ioMeasurement = pConcurrentGroup->GetIoMeasurementInformation(i);
|
||||
DEBUG_BREAK_IF(ioMeasurement == nullptr);
|
||||
|
||||
if (ioMeasurement->GetParams()->SymbolName == std::string("BufferOverflow")) {
|
||||
oaBufferOverflowInformation = ioMeasurement;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// MDAPI checks for proper library initialization
|
||||
if (oaBufferOverflowInformation == nullptr ||
|
||||
oaBufferOverflowInformation->GetParams()->IoReadEquation->GetEquationElementsCount() != 1 ||
|
||||
oaBufferOverflowInformation->GetParams()->IoReadEquation->GetEquationElement(0)->Type != MetricsDiscovery::EQUATION_ELEM_IMM_UINT64) {
|
||||
METRICS_LOG_ERR("IoMeasurmentInformation is not as expected for OA %s", " ");
|
||||
return ZE_RESULT_ERROR_UNKNOWN;
|
||||
}
|
||||
pOaBufferOverflowInformation = oaBufferOverflowInformation;
|
||||
|
||||
// Reserve memory for metric groups
|
||||
metricGroups.reserve(pConcurrentGroupParams->MetricSetsCount);
|
||||
|
||||
@@ -717,11 +693,8 @@ ze_result_t OaMetricGroupImp::readIoStream(uint32_t &reportCount, uint8_t &repor
|
||||
|
||||
switch (readResult) {
|
||||
case MetricsDiscovery::CC_OK:
|
||||
case MetricsDiscovery::CC_READ_PENDING: {
|
||||
MetricsDiscovery::IInformationLatest *oaBufferOverflowInformation = getMetricEnumeration().getOaBufferOverflowInformation();
|
||||
const bool oaBufferOverflow = oaBufferOverflowInformation->GetParams()->IoReadEquation->GetEquationElement(0)->ImmediateUInt64 != 0;
|
||||
return oaBufferOverflow ? ZE_RESULT_WARNING_DROPPED_DATA : ZE_RESULT_SUCCESS;
|
||||
}
|
||||
case MetricsDiscovery::CC_READ_PENDING:
|
||||
return ZE_RESULT_SUCCESS;
|
||||
|
||||
default:
|
||||
return ZE_RESULT_ERROR_UNKNOWN;
|
||||
|
||||
@@ -76,7 +76,6 @@ struct MetricEnumeration {
|
||||
getMetricResultType(const MetricsDiscovery::TMetricResultType sourceMetricResultType) const;
|
||||
void getL0MetricPropertiesFromMdapiMetric(zet_metric_properties_t &l0MetricProps, MetricsDiscovery::IMetric_1_0 *mdapiMetric);
|
||||
void getL0MetricPropertiesFromMdapiInformation(zet_metric_properties_t &l0MetricProps, MetricsDiscovery::IInformation_1_0 *mdapiInformation);
|
||||
MetricsDiscovery::IInformationLatest *getOaBufferOverflowInformation() const { return pOaBufferOverflowInformation; }
|
||||
|
||||
protected:
|
||||
ze_result_t initialize();
|
||||
@@ -116,7 +115,6 @@ struct MetricEnumeration {
|
||||
MetricsDiscovery::IAdapter_1_9 *pAdapter = nullptr;
|
||||
MetricsDiscovery::IMetricsDevice_1_5 *pMetricsDevice = nullptr;
|
||||
uint32_t maximumOaBufferSize = 0u;
|
||||
MetricsDiscovery::IInformationLatest *pOaBufferOverflowInformation = nullptr;
|
||||
|
||||
public:
|
||||
// Metrics Discovery version should be at least 1.5.
|
||||
|
||||
@@ -86,7 +86,7 @@ ze_result_t OaMetricStreamerImp::readData(uint32_t maxReportCount, size_t *pRawD
|
||||
|
||||
// Read streamer data.
|
||||
result = metricGroup->readIoStream(reportCount, *pRawData);
|
||||
if (result == ZE_RESULT_SUCCESS || result == ZE_RESULT_WARNING_DROPPED_DATA) {
|
||||
if (result == ZE_RESULT_SUCCESS) {
|
||||
*pRawDataSize = reportCount * rawReportSize;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,12 +105,11 @@ void SingleMetricStreamerCollector::showResults() {
|
||||
|
||||
// Read raw data.
|
||||
rawData.resize(rawDataSize, 0);
|
||||
ze_result_t status = zetMetricStreamerReadData(metricStreamer, maxRawReportCount, &rawDataSize, rawData.data());
|
||||
VALIDATECALL(zetMetricStreamerReadData(metricStreamer, maxRawReportCount, &rawDataSize, rawData.data()));
|
||||
LOG(zmu::LogLevel::DEBUG) << "Streamer read raw bytes: " << rawDataSize << std::endl;
|
||||
|
||||
if (status == ZE_RESULT_WARNING_DROPPED_DATA) {
|
||||
if (rawDataSize == 0) {
|
||||
rawDataSize = (uint32_t)rawData.size();
|
||||
zmu::sleep(5);
|
||||
VALIDATECALL(zetMetricStreamerReadData(metricStreamer, maxRawReportCount, &rawDataSize, rawData.data()));
|
||||
LOG(zmu::LogLevel::DEBUG) << "Streamer read raw bytes: " << rawDataSize << std::endl;
|
||||
}
|
||||
|
||||
@@ -149,19 +149,6 @@ TEST_F(MetricQueryPoolLinuxTest, givenCorrectArgumentsWhenCacheConfigurationIsCa
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
metricsSetParams.ApiMask = MetricsDiscovery::API_TYPE_OCL;
|
||||
@@ -173,8 +160,6 @@ TEST_F(MetricQueryPoolLinuxTest, givenCorrectArgumentsWhenCacheConfigurationIsCa
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ using MetricsDiscovery::IAdapterGroup_1_8;
|
||||
using MetricsDiscovery::IAdapterGroup_1_9;
|
||||
using MetricsDiscovery::IAdapterGroupLatest;
|
||||
using MetricsDiscovery::IConcurrentGroup_1_5;
|
||||
using MetricsDiscovery::IEquation_1_0;
|
||||
using MetricsDiscovery::IInformation_1_0;
|
||||
using MetricsDiscovery::IMetric_1_0;
|
||||
using MetricsDiscovery::IMetricsDevice_1_5;
|
||||
@@ -46,7 +45,6 @@ using MetricsDiscovery::TAdapterParams_1_9;
|
||||
using MetricsDiscovery::TCompletionCode;
|
||||
using MetricsDiscovery::TConcurrentGroupParams_1_0;
|
||||
using MetricsDiscovery::TEngineParams_1_9;
|
||||
using MetricsDiscovery::TEquationElement_1_0;
|
||||
using MetricsDiscovery::TGlobalSymbol_1_0;
|
||||
using MetricsDiscovery::TMetricParams_1_0;
|
||||
using MetricsDiscovery::TMetricsDeviceParams_1_2;
|
||||
@@ -206,26 +204,6 @@ class Mock<IConcurrentGroup_1_5> : public IConcurrentGroup_1_5 {
|
||||
std::vector<TCompletionCode> openIoStreamResults{};
|
||||
};
|
||||
|
||||
template <>
|
||||
class Mock<IEquation_1_0> : public IEquation_1_0 {
|
||||
public:
|
||||
~Mock() override = default;
|
||||
|
||||
uint32_t GetEquationElementsCount() override {
|
||||
return getEquationElementsCount;
|
||||
}
|
||||
|
||||
TEquationElement_1_0 *GetEquationElement(uint32_t index) override {
|
||||
if (!getEquationElement.empty()) {
|
||||
return getEquationElement[index];
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<TEquationElement_1_0 *> getEquationElement;
|
||||
uint32_t getEquationElementsCount = 1u;
|
||||
};
|
||||
|
||||
template <>
|
||||
class Mock<IMetricSet_1_5> : public IMetricSet_1_5 {
|
||||
public:
|
||||
|
||||
@@ -95,22 +95,6 @@ TEST_F(MetricEnumerationTest, givenTwoConcurrentMetricGroupsWhenZetGetMetricGrou
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup0.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
metricsConcurrentGroup1.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -153,21 +137,6 @@ TEST_F(MetricEnumerationTest, givenInvalidArgumentsWhenZetGetMetricGroupProperti
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -211,21 +180,6 @@ TEST_F(MetricEnumerationTest, givenValidArgumentsWhenZetGetMetricGroupProperties
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -280,19 +234,6 @@ TEST_F(MetricEnumerationTest, givenInvalidArgumentsWhenZetMetricGetIsCalledThenR
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -313,8 +254,6 @@ TEST_F(MetricEnumerationTest, givenInvalidArgumentsWhenZetMetricGetIsCalledThenR
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -340,19 +279,6 @@ TEST_F(MetricEnumerationTest, givenValidArgumentsWhenZetMetricGetIsCalledThenRet
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -378,8 +304,6 @@ TEST_F(MetricEnumerationTest, givenValidArgumentsWhenZetMetricGetIsCalledThenRet
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -414,21 +338,6 @@ TEST_F(MetricEnumerationTest, GivenEnumerationIsSuccessfulWhenReadingMetricsFreq
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -491,19 +400,6 @@ TEST_F(MetricEnumerationTest, GivenValidMetricGroupWhenReadingPropertiesAndIncor
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -531,8 +427,6 @@ TEST_F(MetricEnumerationTest, GivenValidMetricGroupWhenReadingPropertiesAndIncor
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -561,21 +455,6 @@ TEST_F(MetricEnumerationTest, GivenValidMetricGroupWhenReadingFrequencyAndIntern
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -676,21 +555,6 @@ TEST_F(MetricEnumerationTest, GivenEnumerationIsSuccessfulWhenReadingMetricsFreq
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -756,21 +620,6 @@ TEST_F(MetricEnumerationTest, GivenEnumerationIsSuccessfulWhenFailingToReadMetri
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -837,21 +686,6 @@ TEST_F(MetricEnumerationTest, givenValidArgumentsWhenZetMetricGetIsCalledThenRet
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -914,21 +748,6 @@ TEST_F(MetricEnumerationTest, givenInvalidArgumentsWhenZetMetricGetPropertiestIs
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -991,19 +810,6 @@ TEST_F(MetricEnumerationTest, givenValidArgumentsWhenZetMetricGetPropertiestIsCa
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -1035,8 +841,6 @@ TEST_F(MetricEnumerationTest, givenValidArgumentsWhenZetMetricGetPropertiestIsCa
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -1081,21 +885,6 @@ TEST_F(MetricEnumerationTest, givenValidArgumentsWhenZetMetricGetPropertiestIsCa
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -1170,21 +959,6 @@ TEST_F(MetricEnumerationTest, givenInvalidArgumentsWhenzetContextActivateMetricG
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -1243,21 +1017,6 @@ TEST_F(MetricEnumerationTest, givenValidEventBasedMetricGroupWhenzetContextActiv
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -1320,19 +1079,6 @@ TEST_F(MultiDeviceMetricEnumerationTest, givenMultipleDevicesAndValidEventBasedM
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -1363,8 +1109,6 @@ TEST_F(MultiDeviceMetricEnumerationTest, givenMultipleDevicesAndValidEventBasedM
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -1396,19 +1140,6 @@ TEST_F(MultiDeviceMetricEnumerationTest, givenMultipleDevicesAndTwoMetricGroupsW
|
||||
metricsConcurrentGroupParams0.MetricSetsCount = 2;
|
||||
metricsConcurrentGroupParams0.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams0.Description = "OA description";
|
||||
metricsConcurrentGroupParams0.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet0;
|
||||
@@ -1452,8 +1183,6 @@ TEST_F(MultiDeviceMetricEnumerationTest, givenMultipleDevicesAndTwoMetricGroupsW
|
||||
metricsConcurrentGroup0.getMetricSetResults.push_back(&metricsSet1);
|
||||
metricsConcurrentGroup0.getMetricSetResults.push_back(&metricsSet0);
|
||||
metricsConcurrentGroup0.getMetricSetResults.push_back(&metricsSet1);
|
||||
metricsConcurrentGroup0.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet0.GetParamsResult = &metricsSetParams0;
|
||||
metricsSet1.GetParamsResult = &metricsSetParams1;
|
||||
@@ -1498,21 +1227,6 @@ TEST_F(MetricEnumerationTest, givenValidTimeBasedMetricGroupWhenzetContextActiva
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -1574,21 +1288,6 @@ TEST_F(MetricEnumerationTest, givenActivateTheSameMetricGroupTwiceWhenzetContext
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -1655,24 +1354,6 @@ TEST_F(MetricEnumerationTest, givenActivateTwoMetricGroupsWithDifferentDomainsWh
|
||||
metricsConcurrentGroupParams0.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams1.SymbolName = "OA";
|
||||
|
||||
metricsConcurrentGroupParams0.IoMeasurementInformationCount = 1;
|
||||
metricsConcurrentGroupParams1.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
metricsConcurrentGroup0.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
metricsConcurrentGroup1.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -1730,24 +1411,6 @@ TEST_F(MetricEnumerationTest, givenActivateTwoMetricGroupsWithDifferentDomainsAt
|
||||
metricsConcurrentGroupParams0.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams1.SymbolName = "OA";
|
||||
|
||||
metricsConcurrentGroupParams0.IoMeasurementInformationCount = 1;
|
||||
metricsConcurrentGroupParams1.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
metricsConcurrentGroup0.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
metricsConcurrentGroup1.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -1798,21 +1461,6 @@ TEST_F(MetricEnumerationTest, givenActivateTwoMetricGroupsWithTheSameDomainsWhen
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 2;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet0;
|
||||
@@ -1868,21 +1516,6 @@ TEST_F(MetricEnumerationTest, givenValidMetricGroupWhenDeactivateIsDoneThenDomai
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet0;
|
||||
@@ -1923,19 +1556,6 @@ TEST_F(MetricEnumerationTest, GivenAlreadyActivatedMetricGroupWhenzetContextActi
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 2;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
@@ -1956,8 +1576,6 @@ TEST_F(MetricEnumerationTest, GivenAlreadyActivatedMetricGroupWhenzetContextActi
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -2005,21 +1623,6 @@ TEST_F(MetricEnumerationTest, givenInvalidArgumentsWhenZetMetricGroupCalculateMe
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
@@ -2057,21 +1660,6 @@ TEST_F(MetricEnumerationTest, givenIncorrectRawReportSizeWhenZetMetricGroupCalcu
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
@@ -2124,21 +1712,6 @@ TEST_F(MetricEnumerationTest, givenIncorrectRawReportSizeWhenZetMetricGroupCalcu
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
@@ -2193,21 +1766,6 @@ TEST_F(MetricEnumerationTest, givenCorrectRawReportSizeWhenZetMetricGroupCalcula
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -2269,21 +1827,6 @@ TEST_F(MetricEnumerationTest, givenFailedCalculateMetricsWhenZetMetricGroupCalcu
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -2343,21 +1886,6 @@ TEST_F(MetricEnumerationTest, givenInvalidQueryReportSizeWhenZetMetricGroupCalcu
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -2421,21 +1949,6 @@ TEST_F(MetricEnumerationTest, givenCorrectRawDataHeaderWhenZetMetricGroupCalcula
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -2511,19 +2024,6 @@ TEST_F(MetricEnumerationTest, givenCorrectRawReportSizeWhenZetMetricGroupCalcula
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
@@ -2547,8 +2047,6 @@ TEST_F(MetricEnumerationTest, givenCorrectRawReportSizeWhenZetMetricGroupCalcula
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -2592,21 +2090,6 @@ TEST_F(MetricEnumerationTest, givenCorrectRawReportSizeAndLowerProvidedCalculate
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
@@ -2668,21 +2151,6 @@ TEST_F(MetricEnumerationTest, givenCorrectRawReportSizeAndCorrectCalculatedRepor
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
@@ -2741,21 +2209,6 @@ TEST_F(MetricEnumerationTest, givenCorrectRawReportSizeAndCorrectCalculatedRepor
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
@@ -2815,19 +2268,6 @@ TEST_F(MetricEnumerationTest, givenIncorrectCalculationTypeWhenZetMetricGroupCal
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
@@ -2851,8 +2291,6 @@ TEST_F(MetricEnumerationTest, givenIncorrectCalculationTypeWhenZetMetricGroupCal
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -2891,19 +2329,6 @@ TEST_F(MetricEnumerationTest, givenNotInitializedMetricEnumerationWhenIsInitiali
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery: metric set
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
@@ -2924,8 +2349,6 @@ TEST_F(MetricEnumerationTest, givenNotInitializedMetricEnumerationWhenIsInitiali
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -3001,19 +2424,6 @@ TEST_P(MetricEnumerationTestMetricTypes, givenValidMetricTypesWhenSetAndGetIsSam
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -3045,8 +2455,6 @@ TEST_P(MetricEnumerationTestMetricTypes, givenValidMetricTypesWhenSetAndGetIsSam
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -3122,21 +2530,6 @@ TEST_P(MetricEnumerationTestInformationTypes, givenValidInformationTypesWhenSetA
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -3298,21 +2691,6 @@ TEST_F(MetricEnumerationTest, givenValidArgumentsWhenZetGetMetricGroupProperties
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
|
||||
@@ -33,6 +33,36 @@ TEST_F(MetricEnumerationTest, givenTimeAndBufferSizeWhenOpenIoStreamReturnsError
|
||||
EXPECT_EQ(metricGroup.openIoStream(timerPeriodNs, oaBufferSize), ZE_RESULT_ERROR_UNKNOWN);
|
||||
}
|
||||
|
||||
TEST_F(MetricEnumerationTest, givenReportCountAndReportDataWhenReadIoStreamReturnsOkTheMetricGroupReadIoStreamReturnsSuccess) {
|
||||
|
||||
Mock<MetricsDiscovery::IConcurrentGroup_1_5> concurrentGroup;
|
||||
MockMetricSource mockSource{};
|
||||
MetricGroupImpTest metricGroup(mockSource);
|
||||
|
||||
metricGroup.pReferenceConcurrentGroup = &concurrentGroup;
|
||||
|
||||
uint32_t reportCount = 1;
|
||||
uint8_t reportData = 0;
|
||||
|
||||
EXPECT_EQ(metricGroup.readIoStream(reportCount, reportData), ZE_RESULT_SUCCESS);
|
||||
}
|
||||
|
||||
TEST_F(MetricEnumerationTest, givenReportCountAndReportDataWhenReadIoStreamReturnsPendingTheMetricGroupReadIoStreamReturnsSuccess) {
|
||||
|
||||
Mock<MetricsDiscovery::IConcurrentGroup_1_5> concurrentGroup;
|
||||
|
||||
MockMetricSource mockSource{};
|
||||
MetricGroupImpTest metricGroup(mockSource);
|
||||
|
||||
metricGroup.pReferenceConcurrentGroup = &concurrentGroup;
|
||||
concurrentGroup.readIoStreamResult = TCompletionCode::CC_READ_PENDING;
|
||||
|
||||
uint32_t reportCount = 1;
|
||||
uint8_t reportData = 0;
|
||||
|
||||
EXPECT_EQ(metricGroup.readIoStream(reportCount, reportData), ZE_RESULT_SUCCESS);
|
||||
}
|
||||
|
||||
TEST_F(MetricEnumerationTest, givenReportCountAndReportDataWhenReadIoStreamReturnsErrorThenMetrigGroupReadIoStreamReturnsError) {
|
||||
|
||||
Mock<MetricsDiscovery::IConcurrentGroup_1_5> concurrentGroup;
|
||||
@@ -250,19 +280,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenValidArgumentsWhenZetMetricGetProp
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -295,8 +312,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenValidArgumentsWhenZetMetricGetProp
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -349,19 +364,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenRootDeviceIsEnumeratedAfterSubDevi
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -387,8 +389,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenRootDeviceIsEnumeratedAfterSubDevi
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -416,19 +416,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenCorrectRawDataHeaderWhenZetMetricG
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -451,8 +438,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenCorrectRawDataHeaderWhenZetMetricG
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -511,21 +496,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenInvalidDataCountAndTotalMetricCoun
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -604,21 +574,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenInvalidQueryReportSizeWhenZetMetri
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -689,21 +644,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenErrorGeneralOnCalculateMetricsWhen
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -782,21 +722,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenCorrectRawDataHeaderWhenZetMetricG
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -865,21 +790,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenCorrectRawDataHeaderWhenFirstSubDe
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -961,21 +871,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenCorrectRawDataHeaderWhenSecondSubD
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -1057,21 +952,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenCorrectRawDataHeaderWhenBothSubDev
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -1143,21 +1023,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenCorrectRawDataHeaderWhenBothSubDev
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -1238,21 +1103,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenCorrectRawDataHeaderWhenBothSubDev
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -1333,19 +1183,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenOaMetricSourceWhenGetConcurrentMet
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -1368,8 +1205,6 @@ TEST_F(MetricEnumerationMultiDeviceTest, givenOaMetricSourceWhenGetConcurrentMet
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
|
||||
@@ -23,8 +23,8 @@ static const char *testString = "TestString";
|
||||
class MockIEquation10 : public MetricsDiscovery::IEquation_1_0 {
|
||||
public:
|
||||
MockIEquation10() {
|
||||
equationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
equationElement.ImmediateUInt64 = 0;
|
||||
equationElement.Type = MetricsDiscovery::EQUATION_ELEM_OPERATION;
|
||||
equationElement.Operation = MetricsDiscovery::EQUATION_OPER_RSHIFT;
|
||||
equationElement.SymbolName = const_cast<char *>(equationName);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class MetricExportDataOaTest : public Test<MetricMultiDeviceFixture> {
|
||||
informationParams.InfoUnits = "infoParamsUnits";
|
||||
informationParams.LongName = "infoParamsLongName";
|
||||
informationParams.ShortName = "infoParamsShortName";
|
||||
informationParams.SymbolName = "BufferOverflow";
|
||||
informationParams.SymbolName = "infoParamsSymbolName";
|
||||
informationParams.IoReadEquation = &equation;
|
||||
informationParams.QueryReadEquation = &equation;
|
||||
informationParams.OverflowFunction = deltaFunction;
|
||||
@@ -177,7 +177,7 @@ class MetricExportDataOaTest : public Test<MetricMultiDeviceFixture> {
|
||||
auto elementsPtr = zet_intel_metric_df_gpu_offset_to_ptr(zet_intel_metric_df_gpu_equation_element_0_1_offset_t, equation.elements, data);
|
||||
auto elementSymbolPtr = zet_intel_metric_df_gpu_offset_to_ptr(cstring_offset_t, elementsPtr->symbolName, data);
|
||||
EXPECT_STREQ(elementSymbolPtr, "EquationElement");
|
||||
EXPECT_EQ(readUnaligned(&elementsPtr->type), ZET_INTEL_METRIC_DF_EQUATION_ELEM_IMM_UINT64);
|
||||
EXPECT_EQ(readUnaligned(&elementsPtr->type), ZET_INTEL_METRIC_DF_EQUATION_ELEM_OPERATION);
|
||||
EXPECT_EQ(readUnaligned(&elementsPtr->operation), ZET_INTEL_METRIC_DF_EQUATION_OPER_RSHIFT);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ class MetricExportDataOaTest : public Test<MetricMultiDeviceFixture> {
|
||||
auto shortNamePtr = zet_intel_metric_df_gpu_offset_to_ptr(cstring_offset_t, infoPtr->shortName, data);
|
||||
EXPECT_STREQ(shortNamePtr, "infoParamsShortName");
|
||||
auto symbolNamePtr = zet_intel_metric_df_gpu_offset_to_ptr(cstring_offset_t, infoPtr->symbolName, data);
|
||||
EXPECT_STREQ(symbolNamePtr, "BufferOverflow");
|
||||
EXPECT_STREQ(symbolNamePtr, "infoParamsSymbolName");
|
||||
}
|
||||
|
||||
void validateMetricSet(zet_intel_metric_df_gpu_export_data_format_t *data) {
|
||||
|
||||
@@ -43,19 +43,6 @@ TEST_F(MetricQueryPoolTest, givenCorrectArgumentsWhenStreamerIsOpenThenQueryPool
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -86,8 +73,6 @@ TEST_F(MetricQueryPoolTest, givenCorrectArgumentsWhenStreamerIsOpenThenQueryPool
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -487,19 +472,6 @@ TEST_F(MetricQueryPoolTest, givenCorrectArgumentsWhenActivateMetricGroupsIsCalle
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -537,8 +509,6 @@ TEST_F(MetricQueryPoolTest, givenCorrectArgumentsWhenActivateMetricGroupsIsCalle
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
|
||||
@@ -86,19 +86,6 @@ TEST_F(MetricQueryPoolTest, givenMetricQueryIsActiveWhenMetricGroupDeactivateIsC
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -144,8 +131,6 @@ TEST_F(MetricQueryPoolTest, givenMetricQueryIsActiveWhenMetricGroupDeactivateIsC
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -194,19 +179,6 @@ TEST_F(MetricQueryPoolTest, givenMetricGroupIsActiveWhenQueryPoolDestroyIsCalled
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -252,8 +224,6 @@ TEST_F(MetricQueryPoolTest, givenMetricGroupIsActiveWhenQueryPoolDestroyIsCalled
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -365,21 +335,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenCorrectArgumentsWhenZetMetricQueryPo
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -472,21 +427,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenImplicitScalingIsEnabledWhenMetricsA
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -573,19 +513,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenEnableWalkerPartitionIsOnWhenZetComm
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -630,8 +557,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenEnableWalkerPartitionIsOnWhenZetComm
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -702,21 +627,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenFailedMetricsLibraryContextWhenZetMe
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
|
||||
@@ -29,19 +29,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenFailedGetDataWhenZetMetricQueryGetDa
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -91,8 +78,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenFailedGetDataWhenZetMetricQueryGetDa
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -161,21 +146,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenCorrectArgumentsWhenZetCommandListAp
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -309,19 +279,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenInvalidCommandBufferGetSizeWhenZetCo
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -369,8 +326,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenInvalidCommandBufferGetSizeWhenZetCo
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -423,21 +378,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenInvalidCommandBufferGetWhenZetComman
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
|
||||
@@ -39,21 +39,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenValidArgumentsWhenZetMetricGroupCalc
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -181,19 +166,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenCorrectArgumentsWhenActivateMetricGr
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -231,8 +203,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenCorrectArgumentsWhenActivateMetricGr
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
@@ -276,21 +246,6 @@ TEST_F(MultiDeviceMetricQueryPoolTest, givenMetricQueryPoolIsDestroyedWhenMetric
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
|
||||
@@ -42,51 +42,6 @@ TEST_F(MetricStreamerTest, givenInvalidMetricGroupTypeWhenZetMetricStreamerOpenI
|
||||
|
||||
metricGroup.getPropertiesOutProperties = &metricGroupProperties;
|
||||
|
||||
metricsDeviceParams.ConcurrentGroupsCount = 1;
|
||||
|
||||
Mock<IConcurrentGroup_1_5> metricsConcurrentGroup;
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
metricsSetParams.ApiMask = MetricsDiscovery::API_TYPE_OCL;
|
||||
metricsSetParams.QueryReportSize = 0;
|
||||
metricsSetParams.MetricsCount = 11;
|
||||
|
||||
Mock<IMetric_1_0> metric;
|
||||
MetricsDiscovery::TMetricParams_1_0 metricParams = {};
|
||||
|
||||
openMetricsAdapter();
|
||||
|
||||
setupDefaultMocksForMetricDevice(metricsDevice);
|
||||
|
||||
metricsDevice.getConcurrentGroupResults.push_back(&metricsConcurrentGroup);
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
|
||||
metric.GetParamsResult = &metricParams;
|
||||
|
||||
// Metric streamer open.
|
||||
EXPECT_EQ(zetMetricStreamerOpen(context->toHandle(), metricDeviceHandle, metricGroupHandle, &streamerDesc, eventHandle, &streamerHandle), ZE_RESULT_ERROR_INVALID_ARGUMENT);
|
||||
EXPECT_EQ(streamerHandle, nullptr);
|
||||
@@ -117,19 +72,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerOpenIsCalledT
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -147,8 +89,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerOpenIsCalledT
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -207,21 +147,6 @@ TEST_F(MetricStreamerTest, givenRawReportSizeAsZeroWhenZetMetricStreamerOpenIsCa
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -296,19 +221,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsAndMetricGroupsIsNotActivatedWhenZ
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -326,8 +238,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsAndMetricGroupsIsNotActivatedWhenZ
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -340,181 +250,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsAndMetricGroupsIsNotActivatedWhenZ
|
||||
EXPECT_EQ(streamerHandle, nullptr);
|
||||
}
|
||||
|
||||
TEST_F(MetricStreamerTest, givenInValidOaInformationSymbolNameWhenZetMetricGroupGetIsCalledThenCallSucceedsWithCountZero) {
|
||||
|
||||
zet_device_handle_t metricDeviceHandle = device->toHandle();
|
||||
|
||||
// One api: metric group handle.
|
||||
auto &metricOaSource = (static_cast<DeviceImp *>(device))->getMetricDeviceContext().getMetricSource<OaMetricSourceImp>();
|
||||
Mock<MetricGroup> metricGroup(metricOaSource);
|
||||
|
||||
// Metrics Discovery device.
|
||||
metricsDeviceParams.ConcurrentGroupsCount = 1;
|
||||
|
||||
// Metrics Discovery concurrent group.
|
||||
Mock<IConcurrentGroup_1_5> metricsConcurrentGroup;
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 1;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "Invalid";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
metricsSetParams.ApiMask = MetricsDiscovery::API_TYPE_IOSTREAM;
|
||||
metricsSetParams.MetricsCount = 0;
|
||||
metricsSetParams.SymbolName = "Metric set name";
|
||||
metricsSetParams.ShortName = "Metric set description";
|
||||
metricsSetParams.RawReportSize = 256;
|
||||
|
||||
openMetricsAdapter();
|
||||
setupDefaultMocksForMetricDevice(metricsDevice);
|
||||
|
||||
metricsDevice.getConcurrentGroupResults.push_back(&metricsConcurrentGroup);
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
metricsConcurrentGroup.readIoStreamResult = TCompletionCode::CC_READ_PENDING;
|
||||
|
||||
// Metric group count.
|
||||
uint32_t metricGroupCount = 0;
|
||||
EXPECT_EQ(zetMetricGroupGet(metricDeviceHandle, &metricGroupCount, nullptr), ZE_RESULT_SUCCESS);
|
||||
EXPECT_EQ(metricGroupCount, 0u);
|
||||
}
|
||||
|
||||
TEST_F(MetricStreamerTest, givenInValidInformationElementCountWhenZetMetricGroupGetIsCalledThenCallSucceedsWithCountZero) {
|
||||
|
||||
zet_device_handle_t metricDeviceHandle = device->toHandle();
|
||||
|
||||
// One api: metric group handle.
|
||||
auto &metricOaSource = (static_cast<DeviceImp *>(device))->getMetricDeviceContext().getMetricSource<OaMetricSourceImp>();
|
||||
Mock<MetricGroup> metricGroup(metricOaSource);
|
||||
|
||||
// Metrics Discovery device.
|
||||
metricsDeviceParams.ConcurrentGroupsCount = 1;
|
||||
|
||||
// Metrics Discovery concurrent group.
|
||||
Mock<IConcurrentGroup_1_5> metricsConcurrentGroup;
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
ioReadEquation.getEquationElementsCount = 0u;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 1;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
metricsSetParams.ApiMask = MetricsDiscovery::API_TYPE_IOSTREAM;
|
||||
metricsSetParams.MetricsCount = 0;
|
||||
metricsSetParams.SymbolName = "Metric set name";
|
||||
metricsSetParams.ShortName = "Metric set description";
|
||||
metricsSetParams.RawReportSize = 256;
|
||||
|
||||
openMetricsAdapter();
|
||||
setupDefaultMocksForMetricDevice(metricsDevice);
|
||||
|
||||
metricsDevice.getConcurrentGroupResults.push_back(&metricsConcurrentGroup);
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
metricsConcurrentGroup.readIoStreamResult = TCompletionCode::CC_READ_PENDING;
|
||||
|
||||
// Metric group count.
|
||||
uint32_t metricGroupCount = 0;
|
||||
EXPECT_EQ(zetMetricGroupGet(metricDeviceHandle, &metricGroupCount, nullptr), ZE_RESULT_SUCCESS);
|
||||
EXPECT_EQ(metricGroupCount, 0u);
|
||||
}
|
||||
|
||||
TEST_F(MetricStreamerTest, givenInValidInformationElementTypeWhenZetMetricGroupGetIsCalledThenCallSucceedsWithCountZero) {
|
||||
|
||||
zet_device_handle_t metricDeviceHandle = device->toHandle();
|
||||
|
||||
// One api: metric group handle.
|
||||
auto &metricOaSource = (static_cast<DeviceImp *>(device))->getMetricDeviceContext().getMetricSource<OaMetricSourceImp>();
|
||||
Mock<MetricGroup> metricGroup(metricOaSource);
|
||||
|
||||
// Metrics Discovery device.
|
||||
metricsDeviceParams.ConcurrentGroupsCount = 1;
|
||||
|
||||
// Metrics Discovery concurrent group.
|
||||
Mock<IConcurrentGroup_1_5> metricsConcurrentGroup;
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_LAST_1_0;
|
||||
ioEquationElement.ImmediateUInt64 = 1;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
metricsSetParams.ApiMask = MetricsDiscovery::API_TYPE_IOSTREAM;
|
||||
metricsSetParams.MetricsCount = 0;
|
||||
metricsSetParams.SymbolName = "Metric set name";
|
||||
metricsSetParams.ShortName = "Metric set description";
|
||||
metricsSetParams.RawReportSize = 256;
|
||||
|
||||
openMetricsAdapter();
|
||||
setupDefaultMocksForMetricDevice(metricsDevice);
|
||||
|
||||
metricsDevice.getConcurrentGroupResults.push_back(&metricsConcurrentGroup);
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
metricsConcurrentGroup.readIoStreamResult = TCompletionCode::CC_READ_PENDING;
|
||||
|
||||
// Metric group count.
|
||||
uint32_t metricGroupCount = 0;
|
||||
EXPECT_EQ(zetMetricGroupGet(metricDeviceHandle, &metricGroupCount, nullptr), ZE_RESULT_SUCCESS);
|
||||
EXPECT_EQ(metricGroupCount, 0u);
|
||||
}
|
||||
|
||||
TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerOpenIsCalledTwiceThenReturnsObjectInUse) {
|
||||
|
||||
// One api: device handle.
|
||||
@@ -547,19 +282,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerOpenIsCalledT
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -578,8 +300,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerOpenIsCalledT
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -702,21 +422,6 @@ TEST_F(MetricStreamerTest, givenInvalidArgumentsWhenZetMetricStreamerReadDataIsC
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -797,7 +502,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerReadDataIsCal
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
// Metrics Discovery metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -808,18 +512,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerReadDataIsCal
|
||||
metricsSetParams.ShortName = "Metric set description";
|
||||
metricsSetParams.RawReportSize = 256;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
openMetricsAdapter();
|
||||
|
||||
setupDefaultMocksForMetricDevice(metricsDevice);
|
||||
@@ -828,10 +520,8 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerReadDataIsCal
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metric group count.
|
||||
uint32_t metricGroupCount = 0;
|
||||
@@ -872,111 +562,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerReadDataIsCal
|
||||
EXPECT_EQ(zetMetricStreamerClose(streamerHandle), ZE_RESULT_SUCCESS);
|
||||
}
|
||||
|
||||
TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerReadDataIsCalledAndOaBufferOverflowHappensThenDroppedDataIsReturned) {
|
||||
|
||||
// One api: device handle.
|
||||
zet_device_handle_t metricDeviceHandle = device->toHandle();
|
||||
|
||||
// One api: event handle.
|
||||
ze_event_handle_t eventHandle = {};
|
||||
|
||||
// One api: streamer handle.
|
||||
zet_metric_streamer_handle_t streamerHandle = {};
|
||||
zet_metric_streamer_desc_t streamerDesc = {};
|
||||
|
||||
streamerDesc.stype = ZET_STRUCTURE_TYPE_METRIC_STREAMER_DESC;
|
||||
streamerDesc.notifyEveryNReports = 32768;
|
||||
streamerDesc.samplingPeriod = 1000;
|
||||
|
||||
// One api: metric group handle.
|
||||
auto &metricOaSource = (static_cast<DeviceImp *>(device))->getMetricDeviceContext().getMetricSource<OaMetricSourceImp>();
|
||||
Mock<MetricGroup> metricGroup(metricOaSource);
|
||||
zet_metric_group_handle_t metricGroupHandle = metricGroup.toHandle();
|
||||
zet_metric_group_properties_t metricGroupProperties = {ZET_STRUCTURE_TYPE_METRIC_GROUP_PROPERTIES, nullptr};
|
||||
|
||||
// Metrics Discovery device.
|
||||
metricsDeviceParams.ConcurrentGroupsCount = 1;
|
||||
|
||||
// Metrics Discovery concurrent group.
|
||||
Mock<IConcurrentGroup_1_5> metricsConcurrentGroup;
|
||||
TConcurrentGroupParams_1_0 metricsConcurrentGroupParams = {};
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 1;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
metricsSetParams.ApiMask = MetricsDiscovery::API_TYPE_IOSTREAM;
|
||||
metricsSetParams.MetricsCount = 0;
|
||||
metricsSetParams.SymbolName = "Metric set name";
|
||||
metricsSetParams.ShortName = "Metric set description";
|
||||
metricsSetParams.RawReportSize = 256;
|
||||
|
||||
openMetricsAdapter();
|
||||
setupDefaultMocksForMetricDevice(metricsDevice);
|
||||
|
||||
metricsDevice.getConcurrentGroupResults.push_back(&metricsConcurrentGroup);
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
metricsConcurrentGroup.readIoStreamResult = TCompletionCode::CC_READ_PENDING;
|
||||
|
||||
// Metric group count.
|
||||
uint32_t metricGroupCount = 0;
|
||||
EXPECT_EQ(zetMetricGroupGet(metricDeviceHandle, &metricGroupCount, nullptr), ZE_RESULT_SUCCESS);
|
||||
EXPECT_EQ(metricGroupCount, 1u);
|
||||
|
||||
// Metric group handle.
|
||||
EXPECT_EQ(zetMetricGroupGet(metricDeviceHandle, &metricGroupCount, &metricGroupHandle), ZE_RESULT_SUCCESS);
|
||||
EXPECT_EQ(metricGroupCount, 1u);
|
||||
EXPECT_NE(metricGroupHandle, nullptr);
|
||||
|
||||
// Metric group properties.
|
||||
EXPECT_EQ(zetMetricGroupGetProperties(metricGroupHandle, &metricGroupProperties), ZE_RESULT_SUCCESS);
|
||||
EXPECT_EQ(metricGroupProperties.domain, 0u);
|
||||
EXPECT_EQ(metricGroupProperties.samplingType, ZET_METRIC_GROUP_SAMPLING_TYPE_FLAG_TIME_BASED);
|
||||
EXPECT_EQ(metricGroupProperties.metricCount, metricsSetParams.MetricsCount);
|
||||
EXPECT_EQ(strcmp(metricGroupProperties.description, metricsSetParams.ShortName), 0);
|
||||
EXPECT_EQ(strcmp(metricGroupProperties.name, metricsSetParams.SymbolName), 0);
|
||||
|
||||
// Metric group activation.
|
||||
EXPECT_EQ(zetContextActivateMetricGroups(context->toHandle(), metricDeviceHandle, 1, &metricGroupHandle), ZE_RESULT_SUCCESS);
|
||||
|
||||
// Metric streamer open.
|
||||
EXPECT_EQ(zetMetricStreamerOpen(context->toHandle(), metricDeviceHandle, metricGroupHandle, &streamerDesc, eventHandle, &streamerHandle), ZE_RESULT_SUCCESS);
|
||||
EXPECT_NE(streamerHandle, nullptr);
|
||||
|
||||
// Metric streamer: get desired raw data size.
|
||||
size_t rawSize = 0;
|
||||
uint32_t reportCount = 256;
|
||||
EXPECT_EQ(zetMetricStreamerReadData(streamerHandle, reportCount, &rawSize, nullptr), ZE_RESULT_SUCCESS);
|
||||
|
||||
// Metric streamer: read the data.
|
||||
std::vector<uint8_t> rawData;
|
||||
rawData.resize(rawSize);
|
||||
EXPECT_EQ(zetMetricStreamerReadData(streamerHandle, reportCount, &rawSize, rawData.data()), ZE_RESULT_WARNING_DROPPED_DATA);
|
||||
|
||||
// Metric streamer close.
|
||||
EXPECT_EQ(zetMetricStreamerClose(streamerHandle), ZE_RESULT_SUCCESS);
|
||||
}
|
||||
|
||||
TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerReadDataIsCalledWithMaxReportCountOverTheSupportedThenReturnsSuccess) {
|
||||
|
||||
zet_device_handle_t metricDeviceHandle = device->toHandle();
|
||||
@@ -997,7 +582,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerReadDataIsCal
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -1007,18 +591,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerReadDataIsCal
|
||||
metricsSetParams.ShortName = "Metric set description";
|
||||
metricsSetParams.RawReportSize = 256;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
openMetricsAdapter();
|
||||
|
||||
setupDefaultMocksForMetricDevice(metricsDevice);
|
||||
@@ -1027,10 +599,8 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetMetricStreamerReadDataIsCal
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
uint32_t metricGroupCount = 0;
|
||||
EXPECT_EQ(zetMetricGroupGet(metricDeviceHandle, &metricGroupCount, nullptr), ZE_RESULT_SUCCESS);
|
||||
@@ -1096,21 +666,6 @@ TEST_F(MetricStreamerTest, givenInvalidArgumentsWhenZetCommandListAppendMetricSt
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -1196,19 +751,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetCommandListAppendMetricStre
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -1241,8 +783,6 @@ TEST_F(MetricStreamerTest, givenValidArgumentsWhenZetCommandListAppendMetricStre
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -1313,19 +853,6 @@ TEST_F(MetricStreamerTest, givenMultipleMarkerInsertionsWhenZetCommandListAppend
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
// Metrics Discovery metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
@@ -1356,8 +883,6 @@ TEST_F(MetricStreamerTest, givenMultipleMarkerInsertionsWhenZetCommandListAppend
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
|
||||
@@ -43,19 +43,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenInvalidMetricGroupTypeWhenZetMetricSt
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -73,8 +60,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenInvalidMetricGroupTypeWhenZetMetricSt
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -121,19 +106,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricStreamerOp
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -151,8 +123,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricStreamerOp
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -208,19 +178,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenEnableWalkerPartitionIsOnWhenZetMetri
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -241,8 +198,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenEnableWalkerPartitionIsOnWhenZetMetri
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -294,21 +249,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricStreamerOp
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -365,19 +305,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsAndCloseIoStreamFailsWh
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -395,8 +322,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsAndCloseIoStreamFailsWh
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -462,19 +387,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricStreamerOp
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -492,8 +404,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricStreamerOp
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -551,7 +461,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricStreamerRe
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -561,18 +470,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricStreamerRe
|
||||
metricsSetParams.ShortName = "Metric set description";
|
||||
metricsSetParams.RawReportSize = 256;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
openMetricsAdapter();
|
||||
|
||||
setupDefaultMocksForMetricDevice(metricsDevice);
|
||||
@@ -581,10 +478,8 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricStreamerRe
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsConcurrentGroup.readIoStreamOutReportsCount.push_back(20);
|
||||
metricsConcurrentGroup.readIoStreamOutReportsCount.push_back(10);
|
||||
@@ -658,19 +553,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricStreamerRe
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -688,8 +570,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricStreamerRe
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -745,19 +625,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenMultipleMarkerInsertionsWhenZetComman
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -787,8 +654,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenMultipleMarkerInsertionsWhenZetComman
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
|
||||
@@ -48,19 +48,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenEnableWalkerPartitionIsOnWhenZetComma
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -90,8 +77,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenEnableWalkerPartitionIsOnWhenZetComma
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
@@ -142,7 +127,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricGroupCalcu
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -152,18 +136,6 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricGroupCalcu
|
||||
metricsSetParams.RawReportSize = 256;
|
||||
metricsSetParams.MetricsCount = 11;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<IMetric_1_0> metric;
|
||||
MetricsDiscovery::TMetricParams_1_0 metricParams = {};
|
||||
|
||||
@@ -177,14 +149,12 @@ TEST_F(MetricStreamerMultiDeviceTest, givenValidArgumentsWhenZetMetricGroupCalcu
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
metricsSet.GetMetricResult = &metric;
|
||||
metricsSet.calculateMetricsOutReportCount = &returnedMetricCount;
|
||||
|
||||
metric.GetParamsResult = &metricParams;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
uint32_t metricGroupCount = 0;
|
||||
EXPECT_EQ(zetMetricGroupGet(metricDeviceHandle, &metricGroupCount, nullptr), ZE_RESULT_SUCCESS);
|
||||
@@ -244,19 +214,6 @@ TEST_F(MetricStreamerTest, givenRawReportSizeIsNotAlignedToOaBufferSizeWhenZetMe
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
MetricsDiscovery::TMetricSetParams_1_4 metricsSetParams = {};
|
||||
@@ -276,8 +233,6 @@ TEST_F(MetricStreamerTest, givenRawReportSizeIsNotAlignedToOaBufferSizeWhenZetMe
|
||||
|
||||
metricsConcurrentGroup.GetParamsResult = &metricsConcurrentGroupParams;
|
||||
metricsConcurrentGroup.getMetricSetResult = &metricsSet;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
metricsSet.GetParamsResult = &metricsSetParams;
|
||||
|
||||
|
||||
@@ -30,21 +30,6 @@ TEST_F(MetricEnumerationProgrammableTest, whenProgrammableApisAreCalledUnsupport
|
||||
metricsConcurrentGroupParams.MetricSetsCount = 1;
|
||||
metricsConcurrentGroupParams.SymbolName = "OA";
|
||||
metricsConcurrentGroupParams.Description = "OA description";
|
||||
metricsConcurrentGroupParams.IoMeasurementInformationCount = 1;
|
||||
|
||||
Mock<MetricsDiscovery::IEquation_1_0> ioReadEquation;
|
||||
MetricsDiscovery::TEquationElement_1_0 ioEquationElement = {};
|
||||
ioEquationElement.Type = MetricsDiscovery::EQUATION_ELEM_IMM_UINT64;
|
||||
ioEquationElement.ImmediateUInt64 = 0;
|
||||
|
||||
ioReadEquation.getEquationElement.push_back(&ioEquationElement);
|
||||
|
||||
Mock<MetricsDiscovery::IInformation_1_0> ioMeasurement;
|
||||
MetricsDiscovery::TInformationParams_1_0 oaInformation = {};
|
||||
oaInformation.SymbolName = "BufferOverflow";
|
||||
oaInformation.IoReadEquation = &ioReadEquation;
|
||||
metricsConcurrentGroup.GetIoMeasurementInformationResult = &ioMeasurement;
|
||||
ioMeasurement.GetParamsResult = &oaInformation;
|
||||
|
||||
// Metrics Discovery:: metric set.
|
||||
Mock<MetricsDiscovery::IMetricSet_1_5> metricsSet;
|
||||
|
||||
Reference in New Issue
Block a user