p3analysis.report package¶
Module contents¶
- p3analysis.report.snapshot(df, cov=None, directory=None)¶
Generate an HTML report representing a snapshot of P3 characteristics.
The report includes: - A cascade plot (see
p3analysis.plot.cascade()
) - A navigation chart (seep3analysis.plot.navchart()
) - A table breaking down the lines of code shared between applications- Parameters:
df (DataFrame) –
A pandas DataFrame storing performance efficiency data. The following columns are always required: “problem”, “platform”, “application”. At least one of the following columns is required: “app eff” or “arch eff”.
If cov is None, a “coverage” column is required. Values of the “coverage” column must be coverage traces adhering to the P3 Analysis Library coverage schema. Otherwise, a “coverage_key” column is required.
cov (DataFrame, optional) –
A pandas DataFrame storing coverage data. The following columns are required: “coverage_key”, “coverage”.
Values of the “coverage” column must be coverage traces adhering to the P3 Analysis Library coverage schema.
directory (string, optional) – The directory in which to generate the HTML report. If no value is provided, a directory name of the form snapshot000 will be chosen automatically.
- Raises:
ValueError – If any of the required columns are missing. If any coverage string fails to validate against the P3 coverage schema.
TypeError – If any of the values in the “fom” column of df are non-numeric. If any of the values in the “coverage” is not a JSON string.
PermissionError – If the directory specified by directory or any of the files generated by the snapshot cannot be written.
FileExistsError – If the directory specified by directory already exists.