()
| 1127 | |
| 1128 | |
| 1129 | def object_stats_section() -> Section: |
| 1130 | def calc_object_stats_table(stats: Stats) -> Rows: |
| 1131 | object_stats = stats.get_object_stats() |
| 1132 | return [ |
| 1133 | (label, Count(value), Ratio(value, den)) |
| 1134 | for label, (value, den) in object_stats.items() |
| 1135 | ] |
| 1136 | |
| 1137 | return Section( |
| 1138 | "Object stats", |
| 1139 | "Allocations, frees and dict materializatons", |
| 1140 | [ |
| 1141 | Table( |
| 1142 | ("", "Count:", "Ratio:"), |
| 1143 | calc_object_stats_table, |
| 1144 | JoinMode.CHANGE, |
| 1145 | ) |
| 1146 | ], |
| 1147 | doc=""" |
| 1148 | Below, "allocations" means "allocations that are not from a freelist". |
| 1149 | Total allocations = "Allocations from freelist" + "Allocations". |
| 1150 | |
| 1151 | "Inline values" is the number of values arrays inlined into objects. |
| 1152 | |
| 1153 | The cache hit/miss numbers are for the MRO cache, split into dunder and |
| 1154 | other names. |
| 1155 | """, |
| 1156 | ) |
| 1157 | |
| 1158 | |
| 1159 | def gc_stats_section() -> Section: |
no test coverage detected
searching dependent graphs…