Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tools] Add HTML report output to memap script #2165

Closed
wants to merge 4 commits into from
Closed

[Tools] Add HTML report output to memap script #2165

wants to merge 4 commits into from

Conversation

PrzemekWirkus
Copy link
Contributor

@PrzemekWirkus PrzemekWirkus commented Jul 13, 2016

Changes:

  • Add to memap script HTML formatted output for humans.
  • Add memap HTML report to standard (with CSV and JSON) build directory output.
  • This PR should be merged AFTER pull request: [Tools] Replace in memap CSV report fields, see [Tools] Replace in memap CSV report fields #2161

Example of report can be found here.

Changes:
* This change impacts #2047
* In code summary columns were shortened and names changed a bit,
  see [here](https://github.com/mbedmicro/mbed/pull/2047/files?w=1#diff-f9cb941bde5647a5763e18fc220efc51R410)
* There is a need to allign memap CSV report fields (summary columns) with what
  is in code now. This discrapency may create problems when generating reports
  in the future. All columns should have the same name.
* memap CSV sumamry fields names changes:
  'total_static_ram' -> 'static_ram'
  'allocated_heap' -> 'heap'
  'allocated_stack' -> 'stack'

See example of discrepancy:

'total_static_ram' vs 'static_ram'
'allocated_heap' vs 'heap'
'allocated_stack' vs 'stack'

What is in code and presented with prettytable:

+----------------------------------------+--------+-----------+------------+-------+-------+-----------+-------------+
| name                                   | target | toolchain | static_ram | stack |  heap | total_ram | total_flash |
+----------------------------------------+--------+-----------+------------+-------+-------+-----------+-------------+
| tests-mbed_drivers-c_strings           | K64F   | GCC_ARM   |      11468 | 32768 | 65540 |    109776 |       74182 |
| tests-mbed_drivers-callback            | K64F   | GCC_ARM   |      11980 | 32768 | 65540 |    110288 |       88406 |
| tests-mbedmicro-rtos-mbed-threads      | K64F   | GCC_ARM   |      11468 | 32768 | 65540 |    109776 |       75918 |
| tests-mbedmicro-rtos-mbed-timer        | K64F   | GCC_ARM   |      10788 | 32768 | 65540 |    109096 |       68534 |
+----------------------------------------+--------+-----------+------------+-------+-------+-----------+-------------+

vs CSV:

```
total_static_ram,allocated_heap,allocated_stack,total_ram,total_flash
10788,65540,32768,109096,67486
```

vs memstats_map.JSON:

```json
[
    {
        "module": "Fill",
        "size": {
            ".data": 4,
            ".bss": 2257,
            ".text": 173
        }
    },

    {
        "summary": {
            "total_flash": 67486,
            "allocated_stack": 32768,
            "total_static_ram": 10788,
            "total_ram": 109096,
            "allocated_heap": 65540
        }
    }
]
```
@PrzemekWirkus
Copy link
Contributor Author

@bridadan @screamerbg @mlnx Please review
@adbridge @mazimkhan @0xc0170 FYI

@bridadan
Copy link
Contributor

@PrzemekWirkus +1 for HTML reports!

But I think we should probably be creating these reports from template files and rendering them to a file. Something like Jinja2.


td_summary_str += """
<tr>
<td width=150px>Section <font color='%s'><b>%s</b></font>:</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <font> tag has been deprecated from the HTML specification for a long time: http://www.w3schools.com/tags/tag_font.asp

Can we switch to using CSS? The same thing is valid for the following HTML attributes: width, height, align, bgcolor

@PrzemekWirkus
Copy link
Contributor Author

Yes, there will be more work on this one so it looks like it should.

JarkkoPaso pushed a commit to JarkkoPaso/mbed-os that referenced this pull request Aug 26, 2019
…..4a19dc4

4a19dc4 Import new thread files
f6a021d Removed test files
b9e842a Merge branch 'release_internal' into release_external
7d5d869 Merge pull request ARMmbed#2167 from ARMmbed/release_internal_merge
26e2d43 Merge branch 'master' into release_internal
f43620f Add support for India band (ARMmbed#2166)
122f158 Merge pull request ARMmbed#2165 from ARMmbed/release_internal_merge
0e65ee5 Added disabling of NA for Thread BR PPP backbone
4c50e52 Added disabling of NA for Wi-SUN BR PPP backbone
d2ea325 Moved DAD enabled check to Ipv6 SLAAC handler
49994fc Added PPP interface to nanostack
3383e91 Merge pull request ARMmbed#2163 from ARMmbed/IOTTHD-3558
81f7511 MAC: print RF configs
397240a MAC: Implemented CCA threshold and TX power setting
5907042 Added check for allocation failures in EAPOL
9ed97c9 ETX update:
b489415 Add own certificate handling APIS (ARMmbed#2149)
888a0fb fhss_ws: check if 0 used as divider
586f2f2 Merge pull request ARMmbed#2160 from hugueskamba/hk-iotcore-1299-remove-fp-usage-ns_monitor
f1d03b1 Remove floating-point usage in Nanostack heap monitor
ef88f64 Removed rank comprae and also probe 5 best on the list.
a2887d6 Clean PAN id compare trace print.
f37dcf2 Wi-SUN NS NUD & Probe send update
f7133f8 Merge pull request ARMmbed#2158 from ARMmbed/remove_temp_debug_traces
2dc1a8e fhss_ws: removed temporary debug traces
96f962a Reduce wi-sun NS Probe
0a1beb2 GTK update trigger fix
a1d172e Limit Pan config sol timeout after 5 solication.
9d7414b Limit PAE supplikant GTK re-use for authentication from 2->1.
662df08 Fixed Key request address set issue if GTK mismatch is detected.
a56b908 Merge pull request ARMmbed#2153 from ARMmbed/IOTTHD-3650
9b33e98 Fixed mac_pd_sap CCA_PREPARE active ACK handler.
035af9a Enhanced ACK GEN and TX update
b1beb5d fhss_ws: typecast drift to int32_t
f786fc9 Merge pull request ARMmbed#2152 from ARMmbed/fhss_coverity_fix
6efff35 fhss_ws: Coverity fixes
d743e91 WS LLC brodacst shedule fix
6a6fb0c Removed old configuration options from Border router API
a051865 Merge pull request ARMmbed#2135 from ARMmbed/IOTTHD-3232
ff771b1 Added empty interface function for network name set
e94da3c Merge pull request ARMmbed#2146 from ARMmbed/IOTTHD-3571_2
234e649 added network name change function to public API
1770465 fhss_ws: Added temporary debug traces (IOTTHD-3571)
d400859 Fix Thread 1.1 unitests (ARMmbed#2145)
38978f3 wi-sun ETX update:
4a71b04 Adjust Thread functions defined for Thread 1.2 (ARMmbed#2139)
4d8dc0d remove border router from pan size calculation
fb3363e Merge pull request ARMmbed#2141 from ARMmbed/IOTTHD-3571
f01c5f2 fhss_ws: conversion macros/functions to support int64
a7b0027 Suprress dio sending whenRPL is not yet ready
f8c9d54 Adjust tracing (ARMmbed#2138)
678eaf8 Moved Thread 1.2 code to to correct place
f39d07e Merge pull request ARMmbed#2136 from ARMmbed/IOTTHD-3571
ab23116 FHSS: temporary debug traces (IOTTHD-3571)
09d4b06 MAC: Implemented PHY statistics

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: 4a19dc4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants