| 496 | } |
| 497 | |
| 498 | void PerfTelemetry::recordInputEvent(const char* kind, double durationMs) |
| 499 | { |
| 500 | const qint64 now = nowNs(); |
| 501 | if (!beginRecord(now)) |
| 502 | return; |
| 503 | |
| 504 | { |
| 505 | QMutexLocker lock(&m_mutex); |
| 506 | m_window.inputMs.append(durationMs); |
| 507 | } |
| 508 | |
| 509 | if (durationMs > kInputStallMs) { |
| 510 | logStall({ |
| 511 | keyValue(QStringLiteral("kind"), QStringLiteral("input")), |
| 512 | keyValue(QStringLiteral("event"), QString::fromLatin1(kind ? kind : "unknown")), |
| 513 | keyValue(QStringLiteral("durationMs"), msValue(durationMs)), |
| 514 | keyValue(QStringLiteral("drag"), m_dragActive.load(std::memory_order_relaxed) ? 1 : 0) |
| 515 | }); |
| 516 | } |
| 517 | |
| 518 | maybeLogSummary(now); |
| 519 | } |
| 520 | |
| 521 | void PerfTelemetry::recordSHistoryProcessed(double durationMs) |
| 522 | { |