Merged from master, note that SpreaderOrderVM.cs was not merged yet, so this client build will fail

This commit is contained in:
Pedro Pinto committed 2019-03-15 14:41:02 -04:00
commit e998edc20f
108 files changed
+1297 -570

No files matched your search

@@ -45,24 +45,25 @@ struct ActorThread {
stats.publish(loop_metric);
}
void start() {
void start(trace::PerfLog& log) {
if (cfg.poll())
thread = threading::make_thread(cfg.thread_name(), [this]() {
thread = threading::make_thread(cfg.thread_name(), [this,&log]() {
for (;;)
executor.do_work();
executor.do_work(log);
});
else
thread = threading::make_thread(cfg.thread_name(), [this]() {
else {
thread = threading::make_thread(cfg.thread_name(), [this,&log]() {
const auto inner_iter = 1000;
while (!done) {
auto start = Timer::now();
for (auto i = 0; i < inner_iter; i++)
executor.do_work();
executor.do_work(log);
auto stop = Timer::now();
loop_metric->observe(ns_diff(stop, start) / inner_iter);
std::this_thread::sleep_for(10ms);
}
});
}
}
~ActorThread() {
@@ -222,7 +223,7 @@ OrderServiceServer::OrderServiceServer(
// spin up threads
for (auto &t : me->actor_threads)
t->start();
t->start(log);
// wait for the service bridge to be ready
me->service_bridge->block_until_ready();