Created
May 24, 2015 09:07
-
-
Save saurabhwahile/609e9a6c5f0697d0ad43 to your computer and use it in GitHub Desktop.
Measure disk performance on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repeat=10 | |
while [ $x -gt 0 ] | |
do | |
python "C:\\Python27\\lib\\timeit.py" -n 3 "f = open('file.txt', 'wb+'); f.write('chunk'); f.close()" >> results.txt | |
repeat=$((repeat-1)) | |
done | |
data="$(awk '{print $6}' results.txt)" | |
echo $data | |
python -c "results = map(float, \"\"\"$data\"\"\".split('\n')); from matplotlib import pyplot; pyplot.plot(range(1,11), results); pyplot.savefig('results.png')" | |
rm results.txt | |
rm file.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment