(
snapshotter: Snapshotter, event_system_data_info: EventSystemInfoData, event_manager: LocalEventManager
)
| 90 | |
| 91 | |
| 92 | async def test_snapshot_cpu( |
| 93 | snapshotter: Snapshotter, event_system_data_info: EventSystemInfoData, event_manager: LocalEventManager |
| 94 | ) -> None: |
| 95 | event_manager.emit(event=Event.SYSTEM_INFO, event_data=event_system_data_info) |
| 96 | await event_manager.wait_for_all_listeners_to_complete() |
| 97 | cpu_snapshots = cast('list[CpuSnapshot]', snapshotter.get_cpu_sample()) |
| 98 | assert len(cpu_snapshots) == 1 |
| 99 | assert cpu_snapshots[0].used_ratio == event_system_data_info.cpu_info.used_ratio |
| 100 | |
| 101 | |
| 102 | async def test_snapshot_memory( |
nothing calls this directly
no test coverage detected