from petrel_client.utils.profile.profile import profileit | |
def test(): | |
import time | |
time.sleep(0.001) | |
return 1 | |
l = [test() for _ in range(2000)] | |
print('sum:', sum(l)) | |
from petrel_client.utils.profile.profile import profileit | |
def test(): | |
import time | |
time.sleep(0.001) | |
return 1 | |
l = [test() for _ in range(2000)] | |
print('sum:', sum(l)) | |