47#if defined(TIMEMORY_PLOTTING_SOURCE) || !defined(TIMEMORY_USE_PLOTTING_EXTERN)
62 fprintf(stderr,
"[%s]> Empty '%s' (env: '%s'). Plot generation is disabled...\n",
63 _label.c_str(),
"tim::settings::python_exe()",
"TIMEMORY_PYTHON_EXE");
74 std::ifstream ifs(
_file.c_str());
80 "[%s]> file '%s' does not exist. Plot generation is disabled...\n",
81 _label.c_str(),
_file.c_str());
86 auto _ctor = get_env<std::string>(
"TIMEMORY_LIBRARY_CTOR",
"");
87 auto _bann = get_env<std::string>(
"TIMEMORY_BANNER",
"");
88 auto _plot = get_env<std::string>(
"TIMEMORY_CXX_PLOT_MODE",
"");
94 set_env<std::string>(
"TIMEMORY_LIBRARY_CTOR",
"OFF", 1);
95 set_env<std::string>(
"TIMEMORY_BANNER",
"OFF", 1);
96 set_env<std::string>(
"TIMEMORY_CXX_PLOT_MODE",
"1", 1);
107 std::stringstream _log{};
111 std::cout << _log.str() <<
'\n';
115 std::cerr << _log.str() <<
'\n';
119 set_env<std::string>(
"TIMEMORY_CXX_PLOT_MODE",
_plot, 1);
120 set_env<std::string>(
"TIMEMORY_BANNER",
_bann, 1);
121 set_env<std::string>(
"TIMEMORY_LIBRARY_CTOR",
_ctor, 1);
auto join(const char *sep, Arg &&arg, Args &&... args)
const string_t const string_t bool const string_t & _json_file
TIMEMORY_PLOTTING_LINKAGE(void) plot(const string_t &_label
const string_t const string_t & _dir
const string_t const string_t bool _echo_dart
void plot(const std::string &_label, const std::string &_prefix, const std::string &_dir, bool _echo_dart, const std::string &_json_file)
std::unique_lock< mutex_t > auto_lock_t
Unique lock type around mutex_t.
bool launch_process(const char *cmd, const std::string &extra="", std::ostream *os=nullptr)
#define TIMEMORY_JOIN(delim,...)
#define TIMEMORY_LABEL(...)