diff options
| author | Mark Shannon <mark@hotpy.org> | 2021-12-17 14:48:01 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-17 14:48:01 +0000 |
| commit | efd6236d36b292c2c43540132c87cf8425e8d627 (patch) | |
| tree | 87541a787c4e256954b36e847dd247d8e68e2e57 /Lib | |
| parent | 396b58345f81d4c8c5a52546d2288e666a1b9b8b (diff) | |
| download | cpython-git-efd6236d36b292c2c43540132c87cf8425e8d627.tar.gz | |
bpo-46072: Add top level stats struct (GH-30169)
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/opcode.py | 5 | ||||
| -rw-r--r-- | Lib/test/test__opcode.py | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/Lib/opcode.py b/Lib/opcode.py index 7b69988f91..e654a1088b 100644 --- a/Lib/opcode.py +++ b/Lib/opcode.py @@ -288,11 +288,10 @@ _specialized_instructions = [ "STORE_FAST__STORE_FAST", ] _specialization_stats = [ - "specialization_success", - "specialization_failure", + "success", + "failure", "hit", "deferred", "miss", "deopt", - "unquickened", ] diff --git a/Lib/test/test__opcode.py b/Lib/test/test__opcode.py index 6bbab53990..f6b6b3d353 100644 --- a/Lib/test/test__opcode.py +++ b/Lib/test/test__opcode.py @@ -82,13 +82,13 @@ class SpecializationStatsTests(unittest.TestCase): self.assertCountEqual(stats.keys(), specialized_opcodes) self.assertCountEqual( stats['load_attr'].keys(), - stat_names + ['specialization_failure_kinds']) + stat_names + ['failure_kinds']) for sn in stat_names: self.assertIsInstance(stats['load_attr'][sn], int) self.assertIsInstance( - stats['load_attr']['specialization_failure_kinds'], + stats['load_attr']['failure_kinds'], tuple) - for v in stats['load_attr']['specialization_failure_kinds']: + for v in stats['load_attr']['failure_kinds']: self.assertIsInstance(v, int) |
