MCPcopy Create free account
hub / github.com/git/git / trace_performance_vprintf_fl

Function trace_performance_vprintf_fl

trace.c:209–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209static 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
233void trace_printf_key_fl(const char *file, int line, struct trace_key *key,
234 const char *format, ...)

Callers 2

trace_performance_flFunction · 0.85

Calls 5

prepare_trace_lineFunction · 0.85
strbuf_addfFunction · 0.85
strbuf_vaddfFunction · 0.85
print_trace_lineFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected