MCPcopy Create free account
hub / github.com/KDE/labplot / testPerformance_first

Method testPerformance_first

tests/nsl/diff/NSLDiffTest.cpp:137–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135// ##############################################################################
136
137void NSLDiffTest::testPerformance_first() {
138 const int NN = 1e6;
139 QScopedArrayPointer<double> xdata(new double[NN]);
140 QScopedArrayPointer<double> ydata(new double[NN]);
141
142 for (int i = 0; i < NN; i++)
143 xdata[i] = ydata[i] = (double)i;
144
145 QBENCHMARK {
146 int status = nsl_diff_first_deriv(xdata.data(), ydata.data(), NN, 2);
147 QCOMPARE(status, 0);
148 }
149}
150
151void NSLDiffTest::testPerformance_second() {
152 const int NN = 1e6;

Callers

nothing calls this directly

Calls 2

nsl_diff_first_derivFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected