def __init__(self, output_directory, cpus): self.filepath = os.path.join(output_directory, 'power-state-timeline.csv') self.idle_state_names = { cpu.id: [s.name for s in cpu.cpuidle.states] for cpu in cpus } self.writer, self._wfh = create_writer(self.filepath) headers = ['ts' ] + ['{} CPU{}'.format(cpu.name, cpu.id) for cpu in cpus] self.writer.writerow(headers)
def __init__(self, output_directory, cpus): self.filepath = os.path.join(output_directory, 'utilization-timeline.csv') self.writer, self._wfh = create_writer(self.filepath) headers = ['ts' ] + ['{} CPU{}'.format(cpu.name, cpu.id) for cpu in cpus] self.writer.writerow(headers) self._max_freq_list = [ cpu.cpufreq.available_frequencies[-1] for cpu in cpus ]
def __init__(self, output_directory): self.filepath = os.path.join(output_directory, 'state-transitions-timeline.csv') self.writer, self._wfh = create_writer(self.filepath) headers = ['timestamp', 'cpu_id', 'frequency', 'idle_state'] self.writer.writerow(headers)