From aba20bd5cb6056e125c0cda8980b923c5acb5c73 Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Fri, 20 Dec 2019 13:13:45 -0800 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/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 0f7d035d02..59bdec96de 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}") } } }