We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16ef452 commit bc8e217Copy full SHA for bc8e217
README.md
@@ -1385,11 +1385,12 @@ def profiler(func):
1385
def out(*args, **kwargs):
1386
profile = Profile()
1387
result = profile.runcall(func, *args, **kwargs)
1388
- with open(f'profile_{func.__name__}.txt', 'w') as stream:
+ filename = f'profile_{func.__name__}.txt'
1389
+ with open(filename, 'w') as stream:
1390
stats = Stats(profile, stream=stream)
1391
stats.strip_dirs().sort_stats('tottime')
1392
stats.print_stats(20)
- print(f"Profile saved as 'profile_{func.__name__}.txt'")
1393
+ print(f"Profile saved as '{filename}'")
1394
return result
1395
return out
1396
```
0 commit comments