| // Copyright 2022 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| { |
| include: [ "//src/sys/test_runners/inspect/default.shard.cml" ], |
| program: { |
| accessor: "ALL", |
| timeout_seconds: "60", |
| cases: [ |
| // Component manager exposes cpu and queue times for itself. |
| "<component_manager>:root/stats/measurements/components/<component_manager>/*:cpu_times WHERE [a] Count(a) > 0", |
| "<component_manager>:root/stats/measurements/components/<component_manager>/*:queue_times WHERE [a] Count(a) > 0", |
| "<component_manager>:root/stats/measurements/components/<component_manager>/*:timestamps WHERE [a] Count(a) > 0", |
| |
| // Component manager exposes cpu and queue times for bootstrap/archivist. |
| "<component_manager>:root/stats/measurements/components/bootstrap\\/archivist/*:cpu_times WHERE [a] Count(a) > 0", |
| "<component_manager>:root/stats/measurements/components/bootstrap\\/archivist/*:queue_times WHERE [a] Count(a) > 0", |
| "<component_manager>:root/stats/measurements/components/bootstrap\\/archivist/*:timestamps WHERE [a] Count(a) > 0", |
| |
| // Ensure that component manager has at least 2MB of space for CPU measurements and that not all of it is used. |
| // "<component_manager>:root/stats/measurements/fuchsia.inspect.Stats:current_size WHERE [a] a < 2*1024*1024", |
| // "<component_manager>:root/stats/measurements/fuchsia.inspect.Stats:maximum_size WHERE [a] a >= 2*1024*1024", |
| |
| // Component manager exposes the number of tracked tasks, and the value is not zero. |
| "<component_manager>:root/stats/measurements:task_count WHERE [a] a > 0", |
| |
| // Component manager contains recent cpu usage stats. If |
| // previous is not included, there are 3 measurements, otherwise |
| // there are 6. |
| "<component_manager>:root/stats/recent_usage:* WHERE [a] Or(Count(a) == 3, Count(a) == 6)", |
| |
| // Component manager exposes cpu stats processing times. |
| "<component_manager>:root/stats:processing_times_ns WHERE [a] UnhandledType(a)", |
| |
| // Component manager exposes cpu histograms. |
| "<component_manager>:root/stats/histograms:bootstrap\\/archivist WHERE [a] UnhandledType(a)", |
| ], |
| }, |
| } |