From 0bdda343640e8f875e2e6c81743103b1b121e417 Mon Sep 17 00:00:00 2001 From: Matas Lauzadis Date: Tue, 26 Mar 2024 09:52:04 -0400 Subject: [PATCH] Delete Pinpoint benchmark --- .../service/definitions/PinpointBenchmark.kt | 93 ------------------- 1 file changed, 93 deletions(-) delete mode 100644 tests/benchmarks/service-benchmarks/jvm/src/aws/sdk/kotlin/benchmarks/service/definitions/PinpointBenchmark.kt diff --git a/tests/benchmarks/service-benchmarks/jvm/src/aws/sdk/kotlin/benchmarks/service/definitions/PinpointBenchmark.kt b/tests/benchmarks/service-benchmarks/jvm/src/aws/sdk/kotlin/benchmarks/service/definitions/PinpointBenchmark.kt deleted file mode 100644 index 70b0a99d120..00000000000 --- a/tests/benchmarks/service-benchmarks/jvm/src/aws/sdk/kotlin/benchmarks/service/definitions/PinpointBenchmark.kt +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ -package aws.sdk.kotlin.benchmarks.service.definitions - -import aws.sdk.kotlin.benchmarks.service.Common -import aws.sdk.kotlin.services.pinpoint.* -import aws.sdk.kotlin.services.pinpoint.model.ChannelType -import aws.sdk.kotlin.services.pinpoint.model.Event -import aws.sdk.kotlin.services.pinpoint.model.EventsBatch -import aws.smithy.kotlin.runtime.ExperimentalApi -import aws.smithy.kotlin.runtime.time.Instant - -class PinpointBenchmark : ServiceBenchmark { - private val epAddress = Common.random("sdk-benchmark-address-") - private lateinit var appId: String - private val epId = Common.random("sdk-benchmark-endpoint-") - - @OptIn(ExperimentalApi::class) - override suspend fun client() = PinpointClient.fromEnvironment { - retryStrategy = Common.noRetries - telemetryProvider = Common.telemetryProvider - httpClient { - telemetryProvider = Common.telemetryProvider - } - } - - override suspend fun setup(client: PinpointClient) { - val resp = client.createApp { - createApplicationRequest { - name = Common.random("sdk-benchmark-app-") - } - } - - appId = resp.applicationResponse!!.id!! - - client.updateEndpoint { - applicationId = appId - endpointId = epId - endpointRequest { - address = epAddress - channelType = ChannelType.InApp - } - } - } - - override val operations get() = listOf(getEndpointBenchmark, putEventsBenchmark) - - override suspend fun tearDown(client: PinpointClient) { - client.deleteEndpoint { - applicationId = appId - endpointId = epId - } - - client.deleteApp { - applicationId = appId - } - } - - private val getEndpointBenchmark = object : AbstractOperationBenchmark("GetEndpoint") { - override suspend fun transact(client: PinpointClient) { - client.getEndpoint { - applicationId = appId - endpointId = epId - } - } - } - - private val putEventsBenchmark = object : AbstractOperationBenchmark("PutEvents") { - override suspend fun transact(client: PinpointClient) { - client.putEvents { - applicationId = appId - eventsRequest { - batchItem = mapOf( - Common.random() to EventsBatch { - endpoint { - address = epAddress - } - events = mapOf( - "foo" to Event { - eventType = "Bar" - timestamp = Instant.now().toString() - attributes = mapOf("baz" to "qux") - }, - ) - }, - ) - } - } - } - } -}