MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / log_call_duration

Function log_call_duration

external/ggml/src/ggml-virtgpu/virtgpu.cpp:534–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532}
533
534static void log_call_duration(long long call_duration_ns, const char * name) {
535 double call_duration_ms = (double) call_duration_ns / 1e6; // 1 millisecond = 1e6 nanoseconds
536 double call_duration_s = (double) call_duration_ns / 1e9; // 1 second = 1e9 nanoseconds
537
538 if (call_duration_s > 1) {
539 GGML_LOG_INFO(GGML_VIRTGPU "waited %.2fs for the %s host reply...\n", call_duration_s, name);
540 } else if (call_duration_ms > 1) {
541 GGML_LOG_INFO(GGML_VIRTGPU "waited %.2fms for the %s host reply...\n", call_duration_ms, name);
542 } else {
543 GGML_LOG_INFO(GGML_VIRTGPU "waited %lldns for the %s host reply...\n", call_duration_ns, name);
544 }
545}

Callers 2

virtgpu_handshakeFunction · 0.85
virtgpu_load_libraryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected