en un clic
html-reports-description
// Guide for understanding the structure and content of HTML reports generated by the tool
// Guide for understanding the structure and content of HTML reports generated by the tool
Guide for building the tool when asked by the user or testing a code change that requires a new build of the tool
Guide for writing tests in the project
Guide for understanding the tool's functionality and usage in error tracking
| name | html-reports-description |
| description | Guide for understanding the structure and content of HTML reports generated by the tool |
When a program is run, a JSON report is generated that contains detailed information about the errors detected by the tool. This JSON report is then processed to create an HTML report that is more user-friendly and easier to navigate.
The following comamnd is used to generate the HTML report from the JSON report:
$ fpc-create-report -t "test"
Generating FPChecker report...
Trace files found: 0
Exponent usage files found: 0
Error files found: 1
Errors per line files found: 0
Report created: ./fpc-report/index.html
The generated HTML report is stored in the ./fpc_report directory and can be accessed by opening the index.html file in a web browser.
We need to make sure the tool is available in the PATH, so we can run the fpc-create-report command from any directory. For testing purposes, we install the tool always in FPChecker/build/install, and we need to add this directory to the PATH environment variable. This is done by running the following command:
$ export PATH=/Users/lagunaperalt1/projects/fpchecker/FPChecker/build/install/bin:$PATH
The JSON files are generated in the .fpc_logs directory, which is located in the same directory where the instrumented program is run. Each JSON file corresponds to a specific run of the instrumented program and contains detailed information about the errors detected during that run.
For example:
$ ls -l .fpc_logs/
total 8
-rw-r--r-- 1 lagunaperalt1 staff 3014 Apr 2 10:35 rounding_error_king01_61738.json
The code is in FPChecker/cpu_checking/
See:
The current report has three main sections:
The Events section provides a summary of the errors detected during the run of the instrumented program, including the total number of errors and the types of errors detected. The Rounding Error section provides detailed information about the rounding errors detected, including the source code location, the type of error, and the values involved in the computation. The Errors Per Line section provides a summary of the errors detected for each line of code, allowing users to quickly identify lines of code that are more prone to errors.
The templates are stored in FPChecker/cpu_checking/report_templates. See for example: FPChecker/cpu_checking/report_templates/index.html. The templates have placeholder that start with , which are replaced with the actual content when the report is generated. For example: or .
When the report generation code needs to be updated, you can modify the code in the FPChecker/cpu_checking/ directory. This is mainly a python script.
We have to run $ make install to install the updated code and make it available for generating the reports.
See the skill to build the tool.