MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / timeInvocation

Function timeInvocation

test/chbench/chbench/src/timing.h:7–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6template <typename F>
7auto timeInvocation(F&& func) -> std::pair<std::chrono::nanoseconds, decltype(func())> {
8 auto begin = std::chrono::high_resolution_clock::now();
9 auto result = func();
10 auto end = std::chrono::high_resolution_clock::now();
11 return std::make_pair(std::chrono::duration_cast<std::chrono::nanoseconds>(end - begin), result);
12}

Callers 1

peekViewMethod · 0.85

Calls 1

nowFunction · 0.85

Tested by

no test coverage detected