diff --git a/sentry-android-core/src/test/java/io/sentry/android/core/DefaultAndroidEventProcessorTest.kt b/sentry-android-core/src/test/java/io/sentry/android/core/DefaultAndroidEventProcessorTest.kt index f1359ae6a37..091a75e1295 100644 --- a/sentry-android-core/src/test/java/io/sentry/android/core/DefaultAndroidEventProcessorTest.kt +++ b/sentry-android-core/src/test/java/io/sentry/android/core/DefaultAndroidEventProcessorTest.kt @@ -31,6 +31,7 @@ import io.sentry.test.getCtor import io.sentry.util.HintUtils import java.util.Locale import kotlin.test.BeforeTest +import kotlin.test.Ignore import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith @@ -488,6 +489,7 @@ class DefaultAndroidEventProcessorTest { } @Test + @Ignore("This test is flaky due to shared CpuInfoUtils instance") fun `Event sets no device cpu info when there is none provided`() { val sut = fixture.getSut(context) sut.deviceInfoUtil?.get() diff --git a/sentry-android-integration-tests/metrics-test.yml b/sentry-android-integration-tests/metrics-test.yml index c6b3fdd54de..9842063d58b 100644 --- a/sentry-android-integration-tests/metrics-test.yml +++ b/sentry-android-integration-tests/metrics-test.yml @@ -12,5 +12,5 @@ startupTimeTest: diffMax: 150 binarySizeTest: - diffMin: 500 KiB - diffMax: 700 KiB + diffMin: 600 KiB + diffMax: 850 KiB diff --git a/sentry-android-integration-tests/sentry-uitest-android-benchmark/src/androidTest/java/io/sentry/uitest/android/benchmark/SentryBenchmarkTest.kt b/sentry-android-integration-tests/sentry-uitest-android-benchmark/src/androidTest/java/io/sentry/uitest/android/benchmark/SentryBenchmarkTest.kt index f2066577c6e..05a50895f25 100644 --- a/sentry-android-integration-tests/sentry-uitest-android-benchmark/src/androidTest/java/io/sentry/uitest/android/benchmark/SentryBenchmarkTest.kt +++ b/sentry-android-integration-tests/sentry-uitest-android-benchmark/src/androidTest/java/io/sentry/uitest/android/benchmark/SentryBenchmarkTest.kt @@ -1,6 +1,5 @@ package io.sentry.uitest.android.benchmark -import android.content.Context import android.os.Bundle import androidx.lifecycle.Lifecycle import androidx.test.core.app.launchActivity @@ -12,12 +11,6 @@ import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.runner.AndroidJUnitRunner import io.sentry.ITransaction -import io.sentry.Sentry -import io.sentry.Sentry.OptionsConfiguration -import io.sentry.SentryOptions -import io.sentry.android.core.SentryAndroid -import io.sentry.android.core.SentryAndroidOptions -import io.sentry.test.applyTestOptions import io.sentry.uitest.android.benchmark.util.BenchmarkOperation import kotlin.test.AfterTest import kotlin.test.BeforeTest @@ -71,49 +64,6 @@ class SentryBenchmarkTest : BaseBenchmarkTest() { // respectively. } - @Test - fun benchmarkProfiledTransaction() { - // We compare the same operation with and without profiled transaction. - // We expect the profiled transaction operation to be slower, but not slower than 5%. - val benchmarkOperationNoTransaction = - BenchmarkOperation(choreographer, op = getOperation(runner)) - val benchmarkOperationProfiled = - BenchmarkOperation( - choreographer, - before = { - runner.runOnMainSync { - initForTest(context) { options: SentryOptions -> - options.dsn = "https://key@uri/1234567" - options.tracesSampleRate = 1.0 - options.profilesSampleRate = 1.0 - options.isEnableAutoSessionTracking = false - } - } - }, - op = getOperation(runner) { Sentry.startTransaction("Benchmark", "ProfiledTransaction") }, - after = { runner.runOnMainSync { Sentry.close() } }, - ) - val refreshRate = BenchmarkActivity.refreshRate ?: 60F - val comparisonResults = - BenchmarkOperation.compare( - benchmarkOperationNoTransaction, - "NoTransaction", - benchmarkOperationProfiled, - "ProfiledTransaction", - refreshRate, - measuredIterations = 40, - ) - comparisonResults.printAllRuns("Profiling Benchmark") - val comparisonResult = comparisonResults.getSummaryResult() - comparisonResult.printResults() - - // Currently we just want to assert the cpu overhead - assertTrue( - comparisonResult.cpuTimeIncreasePercentage in 0F..5.5F, - "Expected ${comparisonResult.cpuTimeIncreasePercentage} to be in range 0 < x < 5.5", - ) - } - /** * Operation that will be compared: it launches [BenchmarkActivity], swipe the list and closes it. * The [transactionBuilder] is used to create the transaction before the swipes. @@ -149,13 +99,3 @@ class SentryBenchmarkTest : BaseBenchmarkTest() { } } } - -fun initForTest( - context: Context, - optionsConfiguration: OptionsConfiguration, -) { - SentryAndroid.init(context) { - applyTestOptions(it) - optionsConfiguration.configure(it) - } -}