File size: 217 Bytes
2abfccb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from petrel_client.utils.profile.profile import profileit
@profileit(name='xxx',count= 500)
def test():
import time
time.sleep(0.001)
return 1
l = [test() for _ in range(2000)]
print('sum:', sum(l))
|