Commit graph

4 commits

Author SHA1 Message Date
Noah Gold
c8194324ab metric_events & src: add metric for VcpuShutdown.
Add a metric to report VcpuShutdowns.

BUG=b:340719884
TEST=builds

Change-Id: I70115458167fe487696fdc64657c745a93e4c36a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5585672
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2024-05-31 18:25:50 +00:00
Daniel Verkamp
52b8e42869 Cargo.toml: avoid "*" versions for external crates
Ensure that every Cargo.toml dependency on a third-party crates.io crate
specifies at least a major version, or a minor version for 0.x crates,
to ensure that if a new major version is published, it cannot cause API
breaks.

The versions are selected to match the ones already in Cargo.lock, so
this should have no functional change, but it will help prevent new "*"
versions from being introduced via copy-and-paste.

For rationale, see the Cargo FAQ:
<https://doc.rust-lang.org/cargo/faq.html#can-libraries-use--as-a-version-for-their-dependencies>

`minijail`, `audio_streams`, and `cras` are left as "*" for now, since
they have unusual situations (imported from a submodule and/or replaced
at build time with ebuild magic).

BUG=None
TEST=tools/dev_container tools/presubmit
TEST=verify Cargo.lock is unchanged

Change-Id: Ifa18199f812f01d2d10bfb4146b3353c1a76527c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5555656
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-05-22 01:01:42 +00:00
David Stevens
0951eb8702 devices: Add metrics for virtio and RTC wakeup
Add metrics for virtio and RTC wakeup events that includes how long the
guest was asleep for before the wakeup event occurred. Technically guest
userspace can arm the RTC independent of going to sleep, but in practice
it's only armed by the RTC driver when the guest is suspending.

BUG=b:332466813
TEST=Boot ARCVM w/ArcIdleManager+ArcS2Idle, observe histograms

Change-Id: Id6c684334ebc1e80e4fc342302c617531ce2fb6b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5400364
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: David Stevens <stevensd@chromium.org>
2024-04-09 01:50:13 +00:00
David Stevens
1dd411950b metrics: Remove downstream metrics dependencies
Add a metrics_event package instead of relying on metric events provided
out of a vendor/ crate. The new API defines the same events as the
existing vendor API, except it removes any dependencies on downstream
details. To allow downstream projects to define their own events, the
new API adds a vendor metrics_event package to support downstream-only
event types.

BUG=b:332466813
TEST=./tools/dev_container ./tools/presubmit all

Change-Id: I766ad6ca2a0a437bb487e27fb84a4984f66c9770
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5400361
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: David Stevens <stevensd@chromium.org>
2024-04-09 01:36:24 +00:00