Esempio n. 1
0
void one_measurement(int seconds, char *workload)
{
	create_all_usb_devices();
	start_power_measurement();
	devices_start_measurement();
	start_process_measurement();
	start_cpu_measurement();

	if (workload && workload[0]) {
		if (system(workload))
			fprintf(stderr, _("Unknown issue running workload!\n"));
	} else {
		do_sleep(seconds);
	}
	end_cpu_measurement();
	end_process_measurement();
	collect_open_devices();
	devices_end_measurement();
	end_power_measurement();

	process_cpu_data();
	process_process_data();

	/* output stats */
	process_update_display();
	report_summary();
	w_display_cpu_cstates();
	w_display_cpu_pstates();
	if (reporttype != REPORT_OFF) {
		report_display_cpu_cstates();
		report_display_cpu_pstates();
	}
	report_process_update_display();
	tuning_update_display();

	end_process_data();

	global_joules_consumed();
	compute_bundle();

	show_report_devices();
	report_show_open_devices();

	report_devices();
	ahci_create_device_stats_table();
	store_results(measurement_time);
	end_cpu_data();
}
Esempio n. 2
0
void one_measurement(int seconds, char *workload)
{
	create_all_usb_devices();
	start_power_measurement();
	devices_start_measurement();
	start_process_measurement();
	start_cpu_measurement();

	if (workload && workload[0]) {
		system(workload);
	} else {
		do_sleep(seconds);
	}
	end_cpu_measurement();
	end_process_measurement();
	collect_open_devices();
	devices_end_measurement();
	end_power_measurement();

	process_cpu_data();
	process_process_data();

	/* output stats */
	process_update_display();
	report_summary();
	w_display_cpu_cstates();
	w_display_cpu_pstates();
	report_display_cpu_cstates();
	report_display_cpu_pstates();
	report_process_update_display();

	tuning_update_display();

	end_process_data();

	global_joules_consumed();
	compute_bundle();

	show_report_devices();
	report_show_open_devices();

	report_devices();

	store_results(measurement_time);
	end_cpu_data();
}