MCPcopy Create free account
hub / github.com/3rdparty/libprocess / run

Method run

src/tests/benchmarks.cpp:558–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556
557 template <typename T>
558 static void run(const string& name, long repeats)
559 {
560 Promise<Nothing> promise;
561
562 Owned<DispatchProcess> process(new DispatchProcess(&promise, repeats));
563 spawn(*process);
564
565 T data{std::vector<int>(10240, 42)};
566
567 Stopwatch watch;
568 watch.start();
569
570 dispatch(process.get(), &DispatchProcess::handler<T>, data);
571
572 AWAIT_READY(promise.future());
573
574 cout << name << " elapsed: " << watch.elapsed() << endl;
575
576 terminate(process.get());
577 wait(process.get());
578 }
579
580private:
581 Future<Nothing> _handler()

Callers

nothing calls this directly

Calls 7

futureMethod · 0.80
spawnFunction · 0.50
dispatchFunction · 0.50
terminateFunction · 0.50
waitFunction · 0.50
startMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected