Compare commits

...

2 Commits

Author SHA1 Message Date
Ed Hennis
ea2d7f8376 Merge branch 'develop' into ximinez/number-perf 2026-04-28 18:53:16 -04:00
Ed Hennis
f40f8627fb Number perf test
- Run the Number test suite 1000 times to allow for performance measurement
2026-04-28 17:43:45 -05:00

View File

@@ -1581,6 +1581,27 @@ public:
}
};
class NumberPerf_test : public Number_test
{
void
run() override
{
using clock_type = std::chrono::steady_clock;
int limit = 1000;
auto const start = clock_type::now();
for (int i = 0; i < limit; ++i)
{
Number_test::run();
}
auto const duration =
std::chrono::duration_cast<std::chrono::milliseconds>(clock_type::now() - start);
log << "Number test repeated " << limit << " times took " << duration << "\n";
}
};
BEAST_DEFINE_TESTSUITE(Number, basics, xrpl);
BEAST_DEFINE_TESTSUITE_MANUAL(NumberPerf, tx, xrpl);
} // namespace xrpl