#include <algorithm>
#include <functional>
#include <sstream>
#include <string>
#include <vector>
#include "barretenberg/env/logstr.hpp"
Go to the source code of this file.
|
| #define | BENCHMARK_INFO_PREFIX "##BENCHMARK_INFO_PREFIX##" |
| |
| #define | BENCHMARK_INFO_SEPARATOR "#" |
| |
| #define | BENCHMARK_INFO_SUFFIX "##BENCHMARK_INFO_SUFFIX##" |
| |
| #define | BENCH_GATE_COUNT_START(builder, op_name) uint64_t __bench_before = builder.get_num_finalized_gates_inefficient(); |
| |
| #define | BENCH_GATE_COUNT_END(builder, op_name) |
| |
| #define | log_(level, ...) |
| |
| #define | log_fatal(...) log_(LogLevel::FATAL, __VA_ARGS__) |
| |
| #define | log_error(...) log_(LogLevel::ERROR, __VA_ARGS__) |
| |
| #define | log_warn(...) log_(LogLevel::WARN, __VA_ARGS__) |
| |
| #define | important(...) log_(LogLevel::WARN, "important: ", __VA_ARGS__) |
| |
| #define | info(...) log_(LogLevel::INFO, __VA_ARGS__) |
| |
| #define | vinfo(...) log_(LogLevel::VERBOSE, __VA_ARGS__) |
| |
| #define | log_verbose(...) log_(LogLevel::VERBOSE, __VA_ARGS__) |
| |
| #define | debug(...) log_(LogLevel::DEBUG, __VA_ARGS__) |
| |
| #define | log_trace(...) log_(LogLevel::TRACE, __VA_ARGS__) |
| |
|
| template<typename... Args> |
| std::string | format (Args... args) |
| |
| template<typename T > |
| void | benchmark_format_chain (std::ostream &os, T const &first) |
| |
| template<typename T , typename... Args> |
| void | benchmark_format_chain (std::ostream &os, T const &first, Args const &... args) |
| |
| template<typename... Args> |
| std::string | benchmark_format (Args... args) |
| |
| void | set_log_function (LogFunction new_log_function) |
| |
| template<typename... Args> |
| void | benchmark_info (Args...) |
| | Info used to store circuit statistics during CI/CD with concrete structure. Writes straight to log.
|
| |
◆ BENCH_GATE_COUNT_END
| #define BENCH_GATE_COUNT_END |
( |
|
builder, |
|
|
|
op_name |
|
) |
| |
Value: uint64_t __bench_after =
builder.get_num_finalized_gates_inefficient(); \
std::cerr <<
"num gates with " << op_name <<
" = " << __bench_after - __bench_before <<
std::endl; \
benchmark_info(Builder::NAME_STRING, "Bigfield", op_name, "Gate Count", __bench_after - __bench_before);
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition at line 18 of file log.hpp.
◆ BENCH_GATE_COUNT_START
| #define BENCH_GATE_COUNT_START |
( |
|
builder, |
|
|
|
op_name |
|
) |
| uint64_t __bench_before = builder.get_num_finalized_gates_inefficient(); |
◆ BENCHMARK_INFO_PREFIX
| #define BENCHMARK_INFO_PREFIX "##BENCHMARK_INFO_PREFIX##" |
◆ BENCHMARK_INFO_SEPARATOR
| #define BENCHMARK_INFO_SEPARATOR "#" |
◆ BENCHMARK_INFO_SUFFIX
| #define BENCHMARK_INFO_SUFFIX "##BENCHMARK_INFO_SUFFIX##" |
◆ debug
◆ important
◆ info
◆ log_
| #define log_ |
( |
|
level, |
|
|
|
... |
|
) |
| |
Value: do { \
log_function(level,
format(__VA_ARGS__)); \
} \
} while (0)
std::string format(Args... args)
Definition at line 82 of file log.hpp.
◆ log_error
◆ log_fatal
◆ log_trace
◆ log_verbose
◆ log_warn
◆ vinfo
◆ LogFunction
◆ LogLevel
| Enumerator |
|---|
| SILENT | |
| FATAL | |
| ERROR | |
| WARN | |
| INFO | |
| VERBOSE | |
| DEBUG | |
| TRACE | |
Definition at line 63 of file log.hpp.
◆ benchmark_format()
template<typename... Args>
| std::string benchmark_format |
( |
Args... |
args | ) |
|
◆ benchmark_format_chain() [1/2]
template<typename T >
| void benchmark_format_chain |
( |
std::ostream & |
os, |
|
|
T const & |
first |
|
) |
| |
◆ benchmark_format_chain() [2/2]
template<typename T , typename... Args>
| void benchmark_format_chain |
( |
std::ostream & |
os, |
|
|
T const & |
first, |
|
|
Args const &... |
args |
|
) |
| |
◆ benchmark_info()
template<typename... Args>
| void benchmark_info |
( |
Args... |
| ) |
|
|
inline |
Info used to store circuit statistics during CI/CD with concrete structure. Writes straight to log.
Automatically appends the necessary prefix and suffix, as well as separators.
- Template Parameters
-
- Parameters
-
Definition at line 121 of file log.hpp.
◆ format()
template<typename... Args>
| std::string format |
( |
Args... |
args | ) |
|
◆ set_log_function()
◆ bb_log_level
◆ log_function