Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
stats.cpp
Go to the documentation of this file.
1// Stub implementations of bb::avm2::Stats. Linked into binaries that don't pull in vm2_sim
2// (e.g. lightweight `bb` and WASM builds), so callers like bbapi_avm.cpp resolve symbols in
3// every build mode. The stub no-ops because AVM proving cannot run on these targets anyway.
4
6
7namespace bb::avm2 {
8
10{
11 static Stats stats;
12 return stats;
13}
14
15void Stats::reset() {}
16
17void Stats::increment(const std::string& /*key*/, uint64_t /*value*/) {}
18
19void Stats::time(const std::string& /*key*/, const std::function<void()>& f)
20{
21 f();
22}
23
24std::string Stats::to_string(int /*depth*/) const
25{
26 return {};
27}
28
30{
31 return {};
32}
33
34} // namespace bb::avm2
void increment(const std::string &key, uint64_t value)
Definition stats.cpp:21
std::vector< std::pair< std::string, uint64_t > > snapshot() const
Definition stats.cpp:55
static Stats & get()
Definition stats.cpp:10
std::string to_string(int depth=2) const
Definition stats.cpp:36
std::unordered_map< std::string, uint64_t > stats
Definition stats.hpp:57
void reset()
Definition stats.cpp:16
void time(const std::string &key, const std::function< void()> &f)
Definition stats.cpp:27
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13