2021-07-01 19:48:28 +03:00
|
|
|
#!/usr/bin/env python3
|
2022-09-30 11:40:22 +03:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2021-06-24 21:00:11 +03:00
|
|
|
import sys
|
|
|
|
|
|
|
|
ret = 0
|
|
|
|
|
|
|
|
# example input line
|
|
|
|
# test_non_tx_aggregate_limits 0.997759588095738 1.45325589179993 554.45703125
|
|
|
|
for ln in sys.stdin:
|
|
|
|
line = ln.strip().split()
|
|
|
|
|
2021-07-01 19:48:28 +03:00
|
|
|
print(f"{float(line[1]) * 100.0: 8.1f}% CPU {float(line[2]):7.1f}s {float(line[3]): 8.2f} MB RAM {line[0]}")
|
2021-09-29 21:41:49 +03:00
|
|
|
limit = 800
|
|
|
|
|
|
|
|
# until this can be optimized, use higher limits
|
|
|
|
if "test_duplicate_coin_announces" in line[0]:
|
|
|
|
limit = 2200
|
|
|
|
elif (
|
|
|
|
"test_duplicate_large_integer_substr" in line[0]
|
|
|
|
or "test_duplicate_reserve_fee" in line[0]
|
|
|
|
or "test_duplicate_large_integer_negative" in line[0]
|
|
|
|
or "test_duplicate_large_integer" in line[0]
|
|
|
|
):
|
|
|
|
limit = 1100
|
|
|
|
|
|
|
|
if float(line[3]) > limit:
|
2021-06-24 21:00:11 +03:00
|
|
|
print(" ERROR: ^^ exceeded RAM limit ^^ \n")
|
|
|
|
ret += 1
|
|
|
|
|
|
|
|
if ret > 0:
|
|
|
|
print("some tests used too much RAM")
|
|
|
|
|
|
|
|
sys.exit(ret)
|