forked from intel/xml-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Perform Data Analytics on Output Generated JSON intel#8
Analysing JSON data from 2 different ROM images in the form of Pie chart and bar graph view of various parameters. This implementation allows us to see comparative analysis of 2 binary files. With the help of pie chart and bar graphs, we can analyze various components of section types and file types. Implementation for intel#8 Signed-off-by: Kumar, Shubham <shubham.k@intel.com>
- Loading branch information
1 parent
8e0c3c2
commit 1ddefac
Showing
4 changed files
with
565 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Analysing JSON data from 2 different ROM images | ||
|
||
## Pie chart and bar graph view of various parameters from 2 JSON files | ||
|
||
Following types of views can be seen - | ||
|
||
1. Pie chart view of both the images based on file type and section type | ||
2. Bar graph view of each of the parameters of file type and section type to see the comparison in both ROM images | ||
|
||
Installation of ```matplotlib``` is a prerequisite. | ||
|
||
```python | ||
python -m pip install matplotlib | ||
``` | ||
|
||
|
||
## Seeing Pie charts from 2 different JSON files | ||
|
||
Taking 2 JSON files output_1.json and output_2.json as example, we can see the pie chart representation of each of the file types in the following way - | ||
|
||
```python | ||
python analytics.py output_1.json output_2.json filetype | ||
``` | ||
|
||
Similarly, we can see pie chart representation of each of the section types in the following way - | ||
|
||
```python | ||
python analytics.py output_1.json output_2.json section | ||
``` | ||
![Alt text](filetype_piechart.png?raw=true "pie chart showing file types") | ||
|
||
## Seeing Bar graph of various parameters in 2 different JSON files | ||
|
||
if we want to compare the count of FV_FILETYPE_DRIVER, we can do it in the following way - | ||
|
||
```python | ||
python analytics.py output_1.json output_2.json filetype FV_FILETYPE_DRIVER | ||
``` | ||
In the same way, we can compare the count of any section or file type in the 2 JSON files. | ||
|
||
We can compare the count of EFI_SECTION_COMPRESSION in the following way - | ||
|
||
```python | ||
python analytics.py output_1.json output_2.json section EFI_SECTION_COMPRESSION | ||
``` | ||
|
||
Currently, the following file types and section types can be seen in the form of bar graph - | ||
|
||
```python | ||
python analytics.py output_1.json output_2.json filetype FV_FILETYPE_DRIVER | ||
python analytics.py output_1.json output_2.json filetype FV_FILETYPE_APPLICATION | ||
python analytics.py output_1.json output_2.json filetype FV_FILETYPE_FREEFORM | ||
python analytics.py output_1.json output_2.json filetype FV_FILETYPE_PEIM | ||
python analytics.py output_1.json output_2.json filetype FV_FILETYPE_SMM | ||
python analytics.py output_1.json output_2.json filetype FV_FILETYPE_FIRMWARE_VOLUME_IMAGE | ||
python analytics.py output_1.json output_2.json filetype FV_FILETYPE_RAW | ||
|
||
python analytics.py output_1.json output_2.json section EFI_SECTION_COMPRESSION | ||
python analytics.py output_1.json output_2.json section EFI_SECTION_FIRMWARE_VOLUME_IMAGE | ||
python analytics.py output_1.json output_2.json section EFI_SECTION_PEI_DEPEX | ||
python analytics.py output_1.json output_2.json section EFI_SECTION_DXE_DEPEX | ||
python analytics.py output_1.json output_2.json section EFI_SECTION_PE32 | ||
python analytics.py output_1.json output_2.json section EFI_SECTION_RAW | ||
``` | ||
|
||
![Alt text](bar_graph_raw_section.png?raw=true "bar graph showing raw section in 2 JSON files") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.