/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, Datadog, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
#include"precompiled.hpp"
// This test performs mocking of certain JVM functionality. This works by // including the source file under test inside an anonymous namespace (which // prevents linking conflicts) with the mocked symbols redefined.
// The include list should mirror the one found in the included source file - // with the ones that should pick up the mocks removed. Those should be included // later after the mocks have been defined.
// Reincluding source files in the anonymous namespace unfortunately seems to // behave strangely with precompiled headers (only when using gcc though) #ifndef DONT_USE_PRECOMPILED_HEADER #define DONT_USE_PRECOMPILED_HEADER #endif
// make sure the standard deviation is ok
EXPECT_NEAR(population_stdev, sample_stdev, 0.5) << msg; // make sure that the subsampled set mean is within 2-sigma of the original set mean
EXPECT_NEAR(population_mean, sample_mean, population_stdev) << msg; // make sure that the original set mean is within 2-sigma of the subsampled set mean
EXPECT_NEAR(sample_mean, population_mean, sample_stdev) << msg;
}
// We can think of the windows as splitting up a time period, for example a second (window_duration_ms = 100) // The burst tests for early, mid and late apply a burst rate at a selected window, with other windows having no incoming input. // // - early during the first window of a new time period // - mid during the middle window of a new time period // - late during the last window of a new time period // // The tests verify the total sample size correspond to the selected bursts: // // - early start of a second -> each second will have sampled the window set point for a single window only since no debt has accumulated into the new time period. // - mid middle of the second -> each second will have sampled the window set point + accumulated debt for the first 4 windows. // - late end of the second -> each second will have sampled the window set point + accumulated debt for the first 9 windows (i.e. it will have sampled all) //
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.