Perf metrics

This file initiates the script to extract real time perf metrics

class monitormetrics.cpumetrics.perfmetrics.MonitorPerfEventsMetrics(config)[source]

Engine to extract performance metrics

add_timestamp()[source]

This method adds timestamp to the data

compute_derived_metrics()[source]

This method computes all the derived metrics from parsed perf counters

dump_avail_perf_events()[source]

Dump the available perf event list for later use

dump_metrics()[source]

Dump metrics to JSON file and re-initiate perf_metrics dict

get_list_of_pids()[source]

This method gets the list of pids to monitor by adding children pids to parents

initialise_perf_metrics_data_dict()[source]

This method initialises the perf metric related parameters

make_perf_command()[source]

This method make the perf command to run

static match_perf_line(pattern, cmd_out)[source]

This method builds perf output pattern and get matching groups

parse_perf_cmd_out(cmd_out)[source]

This method parses perf command output and populate perf data dict with counter values

post_parsing_steps()[source]

Steps to be made after parsing all metrics

run()[source]

This method extracts perf metrics for a given pid

set_up_perf_events()[source]

This method checks for available perf events, tests them and initialise the data dict

setup_perf_monitor()[source]

Setup steps for monitoring perf metrics