mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 09:16:47 +00:00
Compare commits
13 Commits
pratik/ope
...
ximinez/nu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f30fd70661 | ||
|
|
194bdf683e | ||
|
|
a038d7137a | ||
|
|
8e5d7b6a55 | ||
|
|
9045797212 | ||
|
|
d28e2a4537 | ||
|
|
3820d25001 | ||
|
|
2bd008e52e | ||
|
|
4d378bf139 | ||
|
|
e45e8d2c8c | ||
|
|
827bb11e55 | ||
|
|
dbbbb07ebd | ||
|
|
b19387d84b |
@@ -1583,6 +1583,30 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class NumberPerf_test : public Number_test
|
||||
{
|
||||
void
|
||||
run() override
|
||||
{
|
||||
// This suite will give the most accurate results when run
|
||||
// single threaded, suppressing non-log output.
|
||||
// "--unittest=NumberPerf --quiet --unittest-log"
|
||||
using clock_type = std::chrono::steady_clock;
|
||||
|
||||
int limit = 100000;
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user