Backed out 2 changesets (bug 1432362) for build bustages at tests/gtest/TestHistograms.cp on a CLOSED TREE
authorCosmin Sabou <csabou@mozilla.com>
Tue, 06 Mar 2018 00:33:22 +0200
changeset 461697 fd038d63f99f3b9bc855e8aab4eb0a0c60353149
parent 461696 f082f787a988d88f2fd14962f7af37671c539a7f
child 461698 23c473f89743b37f27cfaba632ac686843e75385
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1432362
milestone60.0a1
backs oute372427420a80b8953cd16a55ee41e4250fdc697
aed9a827a1b9b91fe73caacb1bb70f8237c6999c
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
Backed out 2 changesets (bug 1432362) for build bustages at tests/gtest/TestHistograms.cp on a CLOSED TREE Backed out changeset e372427420a8 (bug 1432362) Backed out changeset aed9a827a1b9 (bug 1432362)
toolkit/components/telemetry/tests/gtest/TestHistograms.cpp
--- a/toolkit/components/telemetry/tests/gtest/TestHistograms.cpp
+++ b/toolkit/components/telemetry/tests/gtest/TestHistograms.cpp
@@ -717,178 +717,8 @@ TEST_F(TelemetryTestFixture, AccumulateK
 
   // Check that the value stored in the histogram matches with |kExpectedLabel2|
   uint32_t uLabel2Value = 0;
   JS::ToUint32(cx.GetJSContext(), label2Value, &uLabel2Value);
   ASSERT_EQ(uLabel2Value, kExpectedLabel2)
         << "The sampleKey histogram did not accumulate the correct number of Label2 samples";
 }
 
-TEST_F(TelemetryTestFixture, AccumulateTimeDelta)
-{
-  const uint32_t kExpectedValue = 100;
-  const TimeStamp start = TimeStamp::Now();
-  const TimeDuration delta = TimeDuration::FromMilliseconds(50);
-
-  AutoJSContextWithGlobal cx(mCleanGlobal);
-
-  GetAndClearHistogram(cx.GetJSContext(), mTelemetry, NS_LITERAL_CSTRING("TELEMETRY_TEST_COUNT"),
-                       false);
-
-  // Accumulate in the histogram
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_COUNT, start - delta, start);
-
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_COUNT, start - delta, start);
-
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_COUNT, start, start);
-
-  // end > start timestamp gives zero contribution
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_COUNT, start + delta, start);
-
-  // Get a snapshot for all the histograms
-  JS::RootedValue snapshot(cx.GetJSContext());
-  GetSnapshots(cx.GetJSContext(), mTelemetry, "TELEMETRY_TEST_COUNT", &snapshot, false);
-
-  // Get the histogram from the snapshot
-  JS::RootedValue histogram(cx.GetJSContext());
-  GetProperty(cx.GetJSContext(), "TELEMETRY_TEST_COUNT", snapshot, &histogram);
-
-  // Get "sum" property from histogram
-  JS::RootedValue sum(cx.GetJSContext());
-  GetProperty(cx.GetJSContext(), "sum", histogram,  &sum);
-
-  // Check that the "sum" stored in the histogram matches with |kExpectedValue|
-  uint32_t uSum = 0;
-  JS::ToUint32(cx.GetJSContext(), sum, &uSum);
-  ASSERT_EQ(uSum, kExpectedValue) << "The histogram is not returning expected value";
-}
-
-TEST_F(TelemetryTestFixture, AccumulateKeyedTimeDelta)
-{
-  const uint32_t kExpectedValue = 100;
-  const TimeStamp start = TimeStamp::Now();
-  const TimeDuration delta = TimeDuration::FromMilliseconds(50);
-
-  AutoJSContextWithGlobal cx(mCleanGlobal);
-
-  GetAndClearHistogram(cx.GetJSContext(), mTelemetry,
-                       NS_LITERAL_CSTRING("TELEMETRY_TEST_KEYED_COUNT"), true);
-
-  // Accumulate time delta in the provided key within the histogram
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_KEYED_COUNT, NS_LITERAL_CSTRING("sample"),
-                                 start - delta, start);
-
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_KEYED_COUNT, NS_LITERAL_CSTRING("sample"),
-                                 start - delta, start);
-
-  // end > start timestamp gives zero contribution
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_KEYED_COUNT, NS_LITERAL_CSTRING("sample"),
-                                 start + delta, start);
-
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_KEYED_COUNT, NS_LITERAL_CSTRING("sample"),
-                                 start, start);
-
-  // Get a snapshot for all the histograms
-  JS::RootedValue snapshot(cx.GetJSContext());
-  GetSnapshots(cx.GetJSContext(), mTelemetry, "TELEMETRY_TEST_KEYED_COUNT", &snapshot, true);
-
-  // Get the histogram from the snapshot
-  JS::RootedValue histogram(cx.GetJSContext());
-  GetProperty(cx.GetJSContext(), "TELEMETRY_TEST_KEYED_COUNT", snapshot, &histogram);
-
-  // Get "sample" property from histogram
-  JS::RootedValue expectedKeyData(cx.GetJSContext());
-  GetProperty(cx.GetJSContext(), "sample", histogram,  &expectedKeyData);
-
-  // Get "sum" property from keyed data
-  JS::RootedValue sum(cx.GetJSContext());
-  GetProperty(cx.GetJSContext(), "sum", expectedKeyData,  &sum);
-
-  // Check that the sum stored in the histogram matches with |kExpectedValue|
-  uint32_t uSum = 0;
-  JS::ToUint32(cx.GetJSContext(), sum, &uSum);
-  ASSERT_EQ(uSum, kExpectedValue) << "The histogram is not returning expected sum";
-}
-TEST_F(TelemetryTestFixture, AccumulateTimeDelta)
-{
-  const uint32_t kExpectedValue = 100;
-  const TimeStamp start = TimeStamp::Now();
-  const TimeDuration delta = TimeDuration::FromMilliseconds(50);
-
-  AutoJSContextWithGlobal cx(mCleanGlobal);
-
-  GetAndClearHistogram(cx.GetJSContext(), mTelemetry, NS_LITERAL_CSTRING("TELEMETRY_TEST_COUNT"),
-                       false);
-
-  // Accumulate in the histogram
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_COUNT, start - delta, start);
-
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_COUNT, start - delta, start);
-
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_COUNT, start, start);
-
-  // end > start timestamp gives zero contribution
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_COUNT, start + delta, start);
-
-  // Get a snapshot for all the histograms
-  JS::RootedValue snapshot(cx.GetJSContext());
-  GetSnapshots(cx.GetJSContext(), mTelemetry, "TELEMETRY_TEST_COUNT", &snapshot, false);
-
-  // Get the histogram from the snapshot
-  JS::RootedValue histogram(cx.GetJSContext());
-  GetProperty(cx.GetJSContext(), "TELEMETRY_TEST_COUNT", snapshot, &histogram);
-
-  // Get "sum" property from histogram
-  JS::RootedValue sum(cx.GetJSContext());
-  GetProperty(cx.GetJSContext(), "sum", histogram,  &sum);
-
-  // Check that the "sum" stored in the histogram matches with |kExpectedValue|
-  uint32_t uSum = 0;
-  JS::ToUint32(cx.GetJSContext(), sum, &uSum);
-  ASSERT_EQ(uSum, kExpectedValue) << "The histogram is not returning expected value";
-}
-
-TEST_F(TelemetryTestFixture, AccumulateKeyedTimeDelta)
-{
-  const uint32_t kExpectedValue = 100;
-  const TimeStamp start = TimeStamp::Now();
-  const TimeDuration delta = TimeDuration::FromMilliseconds(50);
-
-  AutoJSContextWithGlobal cx(mCleanGlobal);
-
-  GetAndClearHistogram(cx.GetJSContext(), mTelemetry,
-                       NS_LITERAL_CSTRING("TELEMETRY_TEST_KEYED_COUNT"), true);
-
-  // Accumulate time delta in the provided key within the histogram
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_KEYED_COUNT, NS_LITERAL_CSTRING("sample"),
-                                 start - delta, start);
-
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_KEYED_COUNT, NS_LITERAL_CSTRING("sample"),
-                                 start - delta, start);
-
-  // end > start timestamp gives zero contribution
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_KEYED_COUNT, NS_LITERAL_CSTRING("sample"),
-                                 start + delta, start);
-
-  Telemetry::AccumulateTimeDelta(Telemetry::TELEMETRY_TEST_KEYED_COUNT, NS_LITERAL_CSTRING("sample"),
-                                 start, start);
-
-  // Get a snapshot for all the histograms
-  JS::RootedValue snapshot(cx.GetJSContext());
-  GetSnapshots(cx.GetJSContext(), mTelemetry, "TELEMETRY_TEST_KEYED_COUNT", &snapshot, true);
-
-  // Get the histogram from the snapshot
-  JS::RootedValue histogram(cx.GetJSContext());
-  GetProperty(cx.GetJSContext(), "TELEMETRY_TEST_KEYED_COUNT", snapshot, &histogram);
-
-  // Get "sample" property from histogram
-  JS::RootedValue expectedKeyData(cx.GetJSContext());
-  GetProperty(cx.GetJSContext(), "sample", histogram,  &expectedKeyData);
-
-  // Get "sum" property from keyed data
-  JS::RootedValue sum(cx.GetJSContext());
-  GetProperty(cx.GetJSContext(), "sum", expectedKeyData,  &sum);
-
-  // Check that the sum stored in the histogram matches with |kExpectedValue|
-  uint32_t uSum = 0;
-  JS::ToUint32(cx.GetJSContext(), sum, &uSum);
-  ASSERT_EQ(uSum, kExpectedValue) << "The histogram is not returning expected sum";
-}