| 532 | } |
| 533 | |
| 534 | static 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 | } |
no outgoing calls
no test coverage detected