perf example.
static void do_work(int amount, int load = 1000000)
{
for(int volatile i = 0; i < amount * load; i++)
;
}
void scheduling()
{
}
void measure()
{
do_work(1);
printf(
"%s\n",
log.c_str());
}
void stack()
{
}
{
return 0;
}
void printDelta(Backtrace const &other, int color=-1) const
void print(int color=-1) const
Convenient wrapper around struct timespec that contains a time interval.
Convenient wrapper around struct timespec that contains an absolute timestamp.
int main_fiber(int argc, char **argv)
#define zth_fiber(...)
Prepare every given function to become a fiber by async.
void mnap(long sleepFor_ms)
Sleep for the given amount of milliseconds.
#define async
Run a function as a new fiber.
void perf_mark(char const *marker)
Put a string marker into the perf output.
void perf_log(char const *fmt,...)
Put a formatted log string into the perf output.
std::basic_string< char, std::char_traits< char >, Config::Allocator< char >::type > string
std::string type using Config::Allocator::type.
void log(char const *fmt,...)
Logs a given printf()-like formatted string.
string format(char const *fmt,...)
Format like sprintf(), but save the result in an zth::string.