@@ -123,7 +123,7 @@ def generate_large_cxf_file(num_samples: int) -> bytes:
123123 xml_bytes = xml_content .encode ("utf-8" )
124124
125125 print (
126- f"Generated CxF file: { len (xml_bytes ):,} bytes ({ len (xml_bytes )/ 1024 / 1024 :.1f} MB)"
126+ f"Generated CxF file: { len (xml_bytes ):,} bytes ({ len (xml_bytes ) / 1024 / 1024 :.1f} MB)"
127127 )
128128 return xml_bytes
129129
@@ -177,8 +177,8 @@ def benchmark_parsing_performance(num_samples: int) -> dict[str, float | int]:
177177 cpu_count = psutil .cpu_count ()
178178 memory_info = psutil .virtual_memory ()
179179
180- print (f"System: { cpu_count } CPU cores, { memory_info .total / 1024 ** 3 :.1f} GB RAM" )
181- print (f"File size: { len (cxf_data ):,} bytes ({ len (cxf_data )/ 1024 / 1024 :.1f} MB)" )
180+ print (f"System: { cpu_count } CPU cores, { memory_info .total / 1024 ** 3 :.1f} GB RAM" )
181+ print (f"File size: { len (cxf_data ):,} bytes ({ len (cxf_data ) / 1024 / 1024 :.1f} MB)" )
182182
183183 # Benchmark 1: Parsing with schema validation
184184 print ("\n 1. Parsing with schema validation..." )
@@ -203,7 +203,7 @@ def benchmark_parsing_performance(num_samples: int) -> dict[str, float | int]:
203203 f" Objects parsed: { len (cxf_obj .resources .object_collection .object_value ):,} "
204204 )
205205 print (
206- f" Throughput: { len (cxf_obj .resources .object_collection .object_value )/ parse_time_with_validation :.0f} objects/second"
206+ f" Throughput: { len (cxf_obj .resources .object_collection .object_value ) / parse_time_with_validation :.0f} objects/second"
207207 )
208208
209209 # Clear memory
@@ -232,7 +232,7 @@ def benchmark_parsing_performance(num_samples: int) -> dict[str, float | int]:
232232 f" Objects parsed: { len (cxf_obj .resources .object_collection .object_value ):,} "
233233 )
234234 print (
235- f" Throughput: { len (cxf_obj .resources .object_collection .object_value )/ parse_time_without_validation :.0f} objects/second"
235+ f" Throughput: { len (cxf_obj .resources .object_collection .object_value ) / parse_time_without_validation :.0f} objects/second"
236236 )
237237
238238 # Performance comparison
@@ -243,10 +243,10 @@ def benchmark_parsing_performance(num_samples: int) -> dict[str, float | int]:
243243 )
244244 print (f" Speedup without validation: { speedup :.2f} x" )
245245 print (
246- f" Data throughput (with validation): { len (cxf_data )/ 1024 / 1024 / parse_time_with_validation :.1f} MB/second"
246+ f" Data throughput (with validation): { len (cxf_data ) / 1024 / 1024 / parse_time_with_validation :.1f} MB/second"
247247 )
248248 print (
249- f" Data throughput (without validation): { len (cxf_data )/ 1024 / 1024 / parse_time_without_validation :.1f} MB/second"
249+ f" Data throughput (without validation): { len (cxf_data ) / 1024 / 1024 / parse_time_without_validation :.1f} MB/second"
250250 )
251251
252252 return {
0 commit comments