
This CL adds the following events - Latency for create, restore from wrapped and sign message - Success/failure and algo for each action See: Latency: https://screenshot.googleplex.com/9zbPzLDsuPX7CEh Success: https://screenshot.googleplex.com/4WhUsF7chKeo9Q7 Bug: 1341286 Change-Id: I274480986332e97a3bfde22739e001df9d7842be Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3884723 Reviewed-by: Alex Ilin <alexilin@chromium.org> Reviewed-by: Adam Langley <agl@chromium.org> Commit-Queue: Kristian Monsen <kristianm@chromium.org> Cr-Commit-Position: refs/heads/main@{#1047569}
35 lines
893 B
C++
35 lines
893 B
C++
// Copyright 2022 The Chromium Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef CRYPTO_UNEXPORTABLE_KEY_METRICS_H_
|
|
#define CRYPTO_UNEXPORTABLE_KEY_METRICS_H_
|
|
|
|
#include "crypto/crypto_export.h"
|
|
|
|
namespace crypto {
|
|
|
|
// Records UMA metrics of TPM availability, latency and successful usage.
|
|
// Does the work on a new background task.
|
|
CRYPTO_EXPORT void MaybeMeasureTpmOperations();
|
|
|
|
// internal namespace to be used by tests only
|
|
namespace internal {
|
|
|
|
// Note that values here are used in a recorded histogram. Don't change
|
|
// the values of existing members.
|
|
enum class TPMSupport {
|
|
kNone = 0,
|
|
kRSA = 1,
|
|
kECDSA = 2,
|
|
kMaxValue = 2,
|
|
};
|
|
|
|
// Exported for testing
|
|
CRYPTO_EXPORT void MeasureTpmOperationsInternalForTesting();
|
|
} // namespace internal
|
|
|
|
} // namespace crypto
|
|
|
|
#endif // CRYPTO_UNEXPORTABLE_KEY_METRICS_H_
|