From a27bc8281a9795397fa5c01445140ba6504960f7 Mon Sep 17 00:00:00 2001 From: bd Date: Tue, 29 Jul 2025 19:04:55 -0400 Subject: Add some manual tests for aiohttp and aiofiles --- t/utils.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 't/utils.py') diff --git a/t/utils.py b/t/utils.py index ee9478d..fd2a4d3 100644 --- a/t/utils.py +++ b/t/utils.py @@ -7,7 +7,7 @@ import unittest class AergiaUnitTestCase(unittest.TestCase): interval = 0.01 - Aergia = Aergia(interval) + Aergia = Aergia(interval, True) # yappi is a singleton def setUp(self): @@ -65,6 +65,18 @@ class AergiaUnitTestCase(unittest.TestCase): if s.name == func_name: return s.ttot + def yappi_print_traceable_results(self, stats): + '''Filters the list of yappi stats, printing information for only the same + functions as Aergia. This is for manual testing.''' + print(f"{'FILE':<30} {'FUNC':<30} {'SEC':<10}") + for s in stats: + fname = s.module + if Aergia._should_trace(fname): + fname = \ + (fname if len(fname) <= 25 else fname[-25:]) + print(f"{fname}:{s.lineno}".ljust(30) + + f"{s.name:<30} {s.ttot:<10.4f}") + def burn_cpu(sec): t0 = Aergia._gettime() -- cgit v1.2.3