@@ -152,18 +152,20 @@ def comprehensive_operation(x):
152152comprehensive_operation (2000 ) # Size limit rejection
153153
154154stats = comprehensive_operation .metrics .get_stats ()
155- print ("\n Complete metrics snapshot:" )
156- print (f" Hits: { stats .hits } " )
157- print (f" Misses: { stats .misses } " )
158- print (f" Hit rate: { stats .hit_rate :.1f} %" )
159- print (f" Total calls: { stats .total_calls } " )
160- print (f" Avg latency: { stats .avg_latency_ms :.2f} ms" )
161- print (f" Stale hits: { stats .stale_hits } " )
162- print (f" Recalculations: { stats .recalculations } " )
163- print (f" Wait timeouts: { stats .wait_timeouts } " )
164- print (f" Size limit rejections: { stats .size_limit_rejections } " )
165- print (f" Entry count: { stats .entry_count } " )
166- print (f" Total size (bytes): { stats .total_size_bytes } " )
155+ print (
156+ f"\n Complete metrics snapshot:\n "
157+ f" Hits: { stats .hits } \n "
158+ f" Misses: { stats .misses } \n "
159+ f" Hit rate: { stats .hit_rate :.1f} %\n "
160+ f" Total calls: { stats .total_calls } \n "
161+ f" Avg latency: { stats .avg_latency_ms :.2f} ms\n "
162+ f" Stale hits: { stats .stale_hits } \n "
163+ f" Recalculations: { stats .recalculations } \n "
164+ f" Wait timeouts: { stats .wait_timeouts } \n "
165+ f" Size limit rejections: { stats .size_limit_rejections } \n "
166+ f" Entry count: { stats .entry_count } \n "
167+ f" Total size (bytes): { stats .total_size_bytes } "
168+ )
167169
168170# Example 5: Programmatic access for monitoring
169171print ("\n " + "=" * 60 )
0 commit comments