File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 2525PID = os .getpid ()
2626
2727
28- @data_source_generator (name = ' Memory Usage' )
28+ @data_source_generator (name = " Memory Usage" )
2929def memory_usage_data_source ():
30- yield ('Memory/Physical/%d' % (PID ), physical_memory_used ())
31- yield ('Memory/Physical/Utilization/%d' % (PID ), physical_memory_used ()/ total_physical_memory ())
30+ yield ("Memory/Physical" , physical_memory_used ())
31+ yield ("Memory/Physical/%d" % (PID ), physical_memory_used ())
32+
33+ yield (
34+ "Memory/Physical/Utilization" ,
35+ physical_memory_used () / total_physical_memory (),
36+ )
37+ yield (
38+ "Memory/Physical/Utilization/%d" % (PID ),
39+ physical_memory_used () / total_physical_memory (),
40+ )
Original file line number Diff line number Diff line change @@ -151,7 +151,9 @@ def test_cpu_metrics_collection(cpu_data_source):
151151
152152
153153EXPECTED_MEMORY_METRICS = (
154+ "Memory/Physical" ,
154155 "Memory/Physical/%d" % PID ,
156+ "Memory/Physical/Utilization" ,
155157 "Memory/Physical/Utilization/%d" % PID ,
156158)
157159
You can’t perform that action at this time.
0 commit comments