39 from argparse
import ArgumentParser
51 return [PSUtilMock.CPU_PERCENTAGE] * 4
54 if __name__ ==
'__main__':
55 parser = ArgumentParser()
56 parser.add_argument(
'--percentage', default=50, type=int)
57 args = parser.parse_known_args()[0]
59 sys.modules[
'psutil'] = PSUtilMock
60 from diagnostic_common_diagnostics
import cpu_monitor
62 PSUtilMock.CPU_PERCENTAGE = args.percentage
def cpu_percent(percpu=False)