From 5f9e7e7ac8e57734547933d88cea3f9313bd3c9e Mon Sep 17 00:00:00 2001 From: Tristan Vuong Date: Tue, 3 Dec 2024 17:40:47 +0000 Subject: [PATCH 1/2] fix id --- .../loadtest/reporting/ReportingUserSimulator.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/org/wfanet/measurement/loadtest/reporting/ReportingUserSimulator.kt b/src/main/kotlin/org/wfanet/measurement/loadtest/reporting/ReportingUserSimulator.kt index 99a80a5dfff..70de2ef47f9 100644 --- a/src/main/kotlin/org/wfanet/measurement/loadtest/reporting/ReportingUserSimulator.kt +++ b/src/main/kotlin/org/wfanet/measurement/loadtest/reporting/ReportingUserSimulator.kt @@ -79,8 +79,8 @@ class ReportingUserSimulator( .firstOrNull { getDataProvider(it.cmmsDataProvider).capabilities.honestMajorityShareShuffleSupported } ?: listEventGroups().first() - val createdPrimitiveReportingSet = createPrimitiveReportingSet(eventGroup) - val createdMetricCalculationSpec = createMetricCalculationSpec() + val createdPrimitiveReportingSet = createPrimitiveReportingSet(eventGroup, runId) + val createdMetricCalculationSpec = createMetricCalculationSpec(runId) val report = report { reportingMetricEntries += @@ -154,7 +154,7 @@ class ReportingUserSimulator( } } - private suspend fun createPrimitiveReportingSet(eventGroup: EventGroup): ReportingSet { + private suspend fun createPrimitiveReportingSet(eventGroup: EventGroup, runId: String): ReportingSet { val primitiveReportingSet = reportingSet { primitive = ReportingSetKt.primitive { cmmsEventGroups += eventGroup.cmmsEventGroup } } @@ -164,7 +164,7 @@ class ReportingUserSimulator( createReportingSetRequest { parent = measurementConsumerName reportingSet = primitiveReportingSet - reportingSetId = "a-123" + reportingSetId = "a-$runId" } ) } catch (e: StatusException) { @@ -172,12 +172,12 @@ class ReportingUserSimulator( } } - private suspend fun createMetricCalculationSpec(): MetricCalculationSpec { + private suspend fun createMetricCalculationSpec(runId: String): MetricCalculationSpec { try { return metricCalculationSpecsClient.createMetricCalculationSpec( createMetricCalculationSpecRequest { parent = measurementConsumerName - metricCalculationSpecId = "a-123" + metricCalculationSpecId = "a-$runId" metricCalculationSpec = metricCalculationSpec { displayName = "union reach" metricSpecs += metricSpec { From 48983d1cfed707d8897ab868edfb1c2618568c55 Mon Sep 17 00:00:00 2001 From: Tristan Vuong Date: Tue, 3 Dec 2024 17:43:30 +0000 Subject: [PATCH 2/2] lint fix --- .../measurement/loadtest/reporting/ReportingUserSimulator.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/org/wfanet/measurement/loadtest/reporting/ReportingUserSimulator.kt b/src/main/kotlin/org/wfanet/measurement/loadtest/reporting/ReportingUserSimulator.kt index 70de2ef47f9..923e554ffc9 100644 --- a/src/main/kotlin/org/wfanet/measurement/loadtest/reporting/ReportingUserSimulator.kt +++ b/src/main/kotlin/org/wfanet/measurement/loadtest/reporting/ReportingUserSimulator.kt @@ -154,7 +154,10 @@ class ReportingUserSimulator( } } - private suspend fun createPrimitiveReportingSet(eventGroup: EventGroup, runId: String): ReportingSet { + private suspend fun createPrimitiveReportingSet( + eventGroup: EventGroup, + runId: String, + ): ReportingSet { val primitiveReportingSet = reportingSet { primitive = ReportingSetKt.primitive { cmmsEventGroups += eventGroup.cmmsEventGroup } }