33 lines
676 B
C++
33 lines
676 B
C++
#include "QuickTest.h"
|
|
#include "ICmd.h"
|
|
|
|
#include "lib/mercury/actors/PingPong.h"
|
|
#include "lib/mercury/executor/Executor.h"
|
|
#include "lib/utils/thread_manager.h"
|
|
|
|
#include <iostream>
|
|
|
|
namespace bts {
|
|
namespace cmd {
|
|
|
|
int QuickTest::execute(std::vector<std::string> const &) {
|
|
threading::configure_current_thread("busy_poll");
|
|
std::set<uint32_t> s;
|
|
for (int i = 0; i < 1<<23;i++)
|
|
s.insert(i);
|
|
|
|
auto sum = 0;
|
|
for(;;) {
|
|
for (auto &b : s)
|
|
sum+=b;
|
|
}
|
|
return sum;
|
|
}
|
|
|
|
std::string QuickTest::help() {
|
|
return "This is a place holder to make it easy to quickly write discardable "
|
|
"test code";
|
|
}
|
|
} // namespace cmd
|
|
} // namespace bts
|