| 207 | } |
| 208 | |
| 209 | static void trace_performance_vprintf_fl(const char *file, int line, |
| 210 | uint64_t nanos, const char *format, |
| 211 | va_list ap) |
| 212 | { |
| 213 | static const char space[] = " "; |
| 214 | struct strbuf buf = STRBUF_INIT; |
| 215 | |
| 216 | if (!prepare_trace_line(file, line, &trace_perf_key, &buf)) |
| 217 | return; |
| 218 | |
| 219 | strbuf_addf(&buf, "performance: %.9f s", (double) nanos / 1000000000); |
| 220 | |
| 221 | if (format && *format) { |
| 222 | if (perf_indent >= strlen(space)) |
| 223 | BUG("Too deep indentation"); |
| 224 | |
| 225 | strbuf_addf(&buf, ":%.*s ", perf_indent, space); |
| 226 | strbuf_vaddf(&buf, format, ap); |
| 227 | } |
| 228 | |
| 229 | print_trace_line(&trace_perf_key, &buf); |
| 230 | strbuf_release(&buf); |
| 231 | } |
| 232 | |
| 233 | void trace_printf_key_fl(const char *file, int line, struct trace_key *key, |
| 234 | const char *format, ...) |
no test coverage detected