Build a decorator that tracks call counts and timing statistics.
Constraints
Example
```python
import time
@benchmark
def add(a, b):
time.sleep(0.01)
return a + b
add(1, 2) # 3
add(3, 4) # 7
print(add.stats)
# Example output (values will vary):
# {'calls': 2, 'total_time': 0.020012, 'average_time': 0.010006, 'best_time': 0.010000}
# Helper functions usage:
simple_sum(2, 3) # 5
stats_calls(add) # 2
```
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints