mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/idf_size_nan_in_json_v4.3' into 'release/v4.3'
Tools: fix appearing NaN value when calling idf_size.py --json (v4.3) See merge request espressif/esp-idf!15352
This commit is contained in:
commit
2ccc45dd11
@ -664,7 +664,7 @@ class StructureForSummary(object):
|
||||
try:
|
||||
r.used_dram_ratio = r.used_dram / r.dram_total
|
||||
except ZeroDivisionError:
|
||||
r.used_dram_ratio = float('nan')
|
||||
r.used_dram_ratio = float('nan') if r.used_dram != 0 else 0
|
||||
r.dram_remain = r.dram_total - r.used_dram
|
||||
|
||||
r.used_iram_vectors = get_size((iram_vectors_list))
|
||||
@ -674,7 +674,7 @@ class StructureForSummary(object):
|
||||
try:
|
||||
r.used_iram_ratio = r.used_iram / r.iram_total
|
||||
except ZeroDivisionError:
|
||||
r.used_iram_ratio = float('nan')
|
||||
r.used_iram_ratio = float('nan') if r.used_iram != 0 else 0
|
||||
r.iram_remain = r.iram_total - r.used_iram
|
||||
|
||||
r.used_diram_data = get_size(diram_data_list)
|
||||
@ -687,7 +687,7 @@ class StructureForSummary(object):
|
||||
try:
|
||||
r.used_diram_ratio = r.used_diram / r.diram_total
|
||||
except ZeroDivisionError:
|
||||
r.used_diram_ratio = float('nan')
|
||||
r.used_diram_ratio = float('nan') if r.used_diram != 0 else 0
|
||||
r.diram_remain = r.diram_total - r.used_diram
|
||||
|
||||
r.used_flash_text = get_size(flash_text_list)
|
||||
|
Loading…
x
Reference in New Issue
Block a user