petrel-oss-python-sdk2 / tests /profile_test.py
Weiyun1025's picture
Upload folder using huggingface_hub
2abfccb verified
raw
history blame
217 Bytes
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))