Bug 1369807 - disable platform microbenchmarks on Linux r=jmaher,wlach
authorIonut Goldan <ionut.goldan@softvision.ro>
Mon, 24 Jul 2017 16:17:47 +0300
changeset 371617 a323aee88b0a
parent 371616 de8759dd2b22
child 371618 9bdc922716e8
push id32252
push userkwierso@gmail.com
push dateSat, 29 Jul 2017 00:17:07 +0000
treeherdermozilla-central@ec329722b2f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher, wlach
bugs1369807
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1369807 - disable platform microbenchmarks on Linux r=jmaher,wlach MozReview-Commit-ID: 8srIIdVUrMo
testing/gtest/mozilla/MozGTestBench.cpp
testing/gtest/rungtests.py
--- a/testing/gtest/mozilla/MozGTestBench.cpp
+++ b/testing/gtest/mozilla/MozGTestBench.cpp
@@ -15,25 +15,27 @@ namespace mozilla {
 void GTestBench(const char* aSuite, const char* aName,
                 const std::function<void()>& aTest)
 {
 #ifdef DEBUG
   // Run the test to make sure that it doesn't fail but don't log
   // any measurements since it's not an optimized build.
   aTest();
 #else
+  bool shouldAlert = bool(getenv("PERFHERDER_ALERTING_ENABLED"));
+
   mozilla::TimeStamp start = TimeStamp::Now();
 
   aTest();
 
   int msDuration = (TimeStamp::Now() - start).ToMicroseconds();
 
   // Print the result for each test. Let perfherder aggregate for us
   printf("PERFHERDER_DATA: {\"framework\": {\"name\": \"%s\"}, "
-                           "\"suites\": [{\"name\": \"%s\", \"subtests\": "
-                               "[{\"name\": \"%s\", \"value\": %i, \"lowerIsBetter\": true}]"
-                           "}]}\n",
-                           MOZ_GTEST_BENCH_FRAMEWORK, aSuite, aName, msDuration);
+                       "\"suites\": [{\"name\": \"%s\", \"subtests\": "
+                           "[{\"name\": \"%s\", \"value\": %i, \"lowerIsBetter\": true, \"shouldAlert\": %s}]"
+                       "}]}\n",
+                       MOZ_GTEST_BENCH_FRAMEWORK, aSuite, aName, msDuration, shouldAlert ? "true" : "false");
 #endif
 }
 
 } // mozilla
 
--- a/testing/gtest/rungtests.py
+++ b/testing/gtest/rungtests.py
@@ -107,19 +107,22 @@ class GTests(object):
         """
         Create and return a dictionary of all the appropriate env variables and values.
         On a remote system, we overload this to set different values and are missing things like os.environ and PATH.
         """
         if not os.path.isdir(self.xre_path):
             raise Exception("xre_path does not exist: %s", self.xre_path)
         env = dict(os.environ)
         env = self.build_core_environment(env)
+        env["PERFHERDER_ALERTING_ENABLED"] = "1"
         pathvar = ""
         if mozinfo.os == "linux":
             pathvar = "LD_LIBRARY_PATH"
+            # disable alerts for unstable tests (Bug 1369807)
+            del env["PERFHERDER_ALERTING_ENABLED"]
         elif mozinfo.os == "mac":
             pathvar = "DYLD_LIBRARY_PATH"
         elif mozinfo.os == "win":
             pathvar = "PATH"
         if pathvar:
             if pathvar in env:
                 env[pathvar] = "%s%s%s" % (self.xre_path, os.pathsep, env[pathvar])
             else: