timm
copied
Jael Gu
2 years ago
2 changed files with 24 additions and 1 deletions
@ -0,0 +1,21 @@ |
|||
|
|||
m towhee import triton_client |
|||
import sys |
|||
import time |
|||
|
|||
num = int(sys.argv[-1]) |
|||
data = '../towhee.jpeg' |
|||
client = triton_client.Client('localhost:8000') |
|||
|
|||
# warm up |
|||
client.batch([data]) |
|||
print('client: ok') |
|||
|
|||
time.sleep(5) |
|||
|
|||
print('test...') |
|||
start = time.time() |
|||
client.batch([data] * num, batch_size=8) |
|||
end = time.time() |
|||
print(f'duration: {end - start}') |
|||
print(f'qps: {num / (end - start)}') |
Loading…
Reference in new issue