Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonas Brunsgaard brunsgaard

View GitHub Profile
@brunsgaard
brunsgaard / beta_test_rand_mix_rw
Last active Jan 7, 2020
Checking IOPS with fio
View beta_test_rand_mix_rw
test_rand_mix_rw: (groupid=0, jobs=1): err= 0: pid=29890: Tue Jan 7 12:33:06 2020
read: IOPS=57.5k, BW=449MiB/s (471MB/s)(2046MiB/4557msec)
slat (nsec): min=1550, max=48849, avg=2505.48, stdev=1810.42
clat (usec): min=70, max=10830, avg=496.39, stdev=482.92
lat (usec): min=73, max=10832, avg=498.94, stdev=482.93
clat percentiles (usec):
| 1.00th=[ 88], 5.00th=[ 113], 10.00th=[ 137], 20.00th=[ 176],
| 30.00th=[ 215], 40.00th=[ 258], 50.00th=[ 318], 60.00th=[ 400],
| 70.00th=[ 537], 80.00th=[ 766], 90.00th=[ 1123], 95.00th=[ 1385],
| 99.00th=[ 2278], 99.50th=[ 2868], 99.90th=[ 4080], 99.95th=[ 4555],
View s3_flask_python.py
import threading
import boto3
import flask
local = threading.local()
class S3:
View s3_flask_python.py
```python
import threading
import boto3
import flask
local = threading.local()
View s3_flask_python.py
```python
import threading
import boto3
import flask
local = threading.local()
View s3_flask_python.py
```python
import threading
import boto3
import flask
local = threading.local()
View s3_flask_python.py
```python
import threading
import boto3
import flask
local = threading.local()
View s3_flask_python.py
```python
import threading
import boto3
import flask
local = threading.local()
View s3_flask_python.py
```python
import threading
import boto3
import flask
local = threading.local()
View benchmark.py
import timeit
def test(setup, build, serialize, deserialize, number, entries, name):
print('Testing {}: '.format(name))
build = build.format(n=entries)
build_times = timeit.repeat(repeat=1, number=number, stmt=build, setup=setup)
print('{:<20} {:>6} ms'.format('build datastructure:', int(min(build_times) * 1000)))
setup = setup + build
serialize_times = timeit.repeat(repeat=1, number=number, stmt=serialize, setup=setup)
print('{:<20} {:>6} ms'.format('serialize:', int(min(serialize_times) * 1000)))
View buffers_benchmark.py
import timeit
def test(setup, build, serialize, deserialize, number, entries, name):
build = build.format(n=entries)
build_times = timeit.repeat(repeat=1, number=number, stmt=build, setup=setup)
print('{:<20} {:>5} ms'.format('build datastructure:', int(min(build_times) * 1000)))
setup = setup + build
serialize_times = timeit.repeat(repeat=1, number=number, stmt=serialize, setup=setup)
print('{:<20} {:>5} ms'.format('serialize:', int(min(serialize_times) * 1000)))
setup = setup + serialize
You can’t perform that action at this time.