MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / run_stress_test

Function run_stress_test

python/tests/comprehensive_fuzz_test.py:152–182  ·  view source on GitHub ↗

Run intensive stress test with our optimal configuration

()

Source from the content-addressed store, hash-verified

150
151
152def run_stress_test():
153 """Run intensive stress test with our optimal configuration"""
154 print(f"\n🔥 STRESS TEST: Optimal Configuration")
155 print("=" * 70)
156
157 # Use our optimal capacity with large dataset
158 capacity = 256
159 prepopulate = 50000
160 operations = 500000 # Half million operations
161
162 print(
163 f"Configuration: Capacity={capacity}, Prepopulate={prepopulate:,}, Operations={operations:,}"
164 )
165
166 seed = random.randint(1, 1000000)
167 tester = BPlusTreeFuzzTester(capacity=capacity, seed=seed, prepopulate=prepopulate)
168
169 start_time = time.time()
170 success = tester.run_fuzz_test(operations)
171 elapsed = time.time() - start_time
172
173 if success:
174 print(f"✅ STRESS TEST PASSED!")
175 print(f" Time: {elapsed:.1f}s")
176 print(f" Rate: {operations/elapsed:.0f} ops/sec")
177 print(f" Final size: {len(tester.btree):,} keys")
178 else:
179 print(f"❌ STRESS TEST FAILED")
180 print(f" Seed: {seed}")
181
182 return success
183
184
185def run_edge_case_tests():

Callers 1

Calls 2

run_fuzz_testMethod · 0.95
BPlusTreeFuzzTesterClass · 0.90

Tested by

no test coverage detected