mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-09 20:04:20 +00:00
This search/replace updates all copyright notices to drop the "All rights reserved", Use "ChromiumOS" instead of "Chromium OS" and drops the trailing dots. This fulfills the request from legal and unifies our notices. ./tools/health-check has been updated to only accept this style. BUG=b:246579983 TEST=./tools/health-check Change-Id: I87a80701dc651f1baf4820e5cc42469d7c5f5bf7 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894243 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Dennis Kempin <denniskempin@google.com>
49 lines
1.3 KiB
Rust
49 lines
1.3 KiB
Rust
// Copyright 2022 The ChromiumOS Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
//! Structs used to transport log requests between client processes and the logging controller
|
|
|
|
use serde::Deserialize;
|
|
use serde::Serialize;
|
|
|
|
use crate::MetricEventType;
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct LogMetric {
|
|
pub event_code: MetricEventType,
|
|
pub value: i64,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct LogDescriptor {
|
|
pub event_code: MetricEventType,
|
|
pub descriptor: i64,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct LogHighFrequencyDescriptorMetric {
|
|
pub event_code: MetricEventType,
|
|
pub descriptor: i64,
|
|
pub step: i64,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub struct EventWithSerializedDetails {
|
|
pub event_code: MetricEventType,
|
|
pub serialized_details: Box<[u8]>,
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Debug)]
|
|
pub enum MetricsRequest {
|
|
LogDescriptor(LogDescriptor),
|
|
LogEvent(MetricEventType),
|
|
LogMetric(LogMetric),
|
|
LogHistogram(LogMetric),
|
|
SetAuthToken(String),
|
|
SetGraphicsApi(String),
|
|
SetPackageName(String),
|
|
MergeSessionInvariants(Vec<u8>),
|
|
LogHighFrequencyDescriptorMetric(LogHighFrequencyDescriptorMetric),
|
|
LogEventWithSerializedDetails(EventWithSerializedDetails),
|
|
}
|