python-gevent/benchmarks/micro_sleep.sh

9 lines
381 B
Bash
Raw Normal View History

2022-11-25 16:30:36 +08:00
#!/bin/sh
set -e -x
PYTHON=${PYTHON:=python}
$PYTHON -m perf timeit -s 'from gevent import sleep; f = lambda : 5' 'sleep(0)'
$PYTHON -m perf timeit -s 'from gevent import sleep; f = lambda : 5' 'sleep(0.00001)'
$PYTHON -m perf timeit -s 'from gevent import sleep; f = lambda : 5' 'sleep(0.0001)'
$PYTHON -m perf timeit -s 'from gevent import sleep; f = lambda : 5' 'sleep(0.001)'