From ac97dd72b16f4e61b110e5e7a5b91077f16f2903 Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Fri, 20 Dec 2019 13:13:45 -0800 Subject: [PATCH] For #6464: Set "forPerformanceTest" to ReleaseChannel.FenixProduction. This fixes a perf measurement issue where Sentry would capture an event when using the forPerformanceTest variants. --- app/src/main/java/org/mozilla/fenix/Config.kt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/Config.kt b/app/src/main/java/org/mozilla/fenix/Config.kt index 0f7d035d0..59bdec96d 100644 --- a/app/src/main/java/org/mozilla/fenix/Config.kt +++ b/app/src/main/java/org/mozilla/fenix/Config.kt @@ -4,8 +4,6 @@ package org.mozilla.fenix -import io.sentry.Sentry - enum class ReleaseChannel { FenixDebug, FenixNightly, FenixBeta, FenixProduction, FennecProduction; @@ -47,10 +45,15 @@ object Config { "fenixNightly" -> ReleaseChannel.FenixNightly "debug" -> ReleaseChannel.FenixDebug "fennecProduction" -> ReleaseChannel.FennecProduction + + // Builds for local performance analysis, recording benchmarks, automation, etc. + // This should be treated like a released channel because we want to test + // what users experience and there are performance-impacting changes in debug + // release channels (e.g. logging) that are never intended to be shipped. + "forPerformanceTest" -> ReleaseChannel.FenixProduction + else -> { - Sentry.capture("BuildConfig.BUILD_TYPE ${BuildConfig.BUILD_TYPE} did not match expected channels") - // Performance-test builds should test production behaviour - ReleaseChannel.FenixProduction + throw IllegalStateException("Unknown build type: ${BuildConfig.BUILD_TYPE}") } } }