-
-
Save stetro/2869004 to your computer and use it in GitHub Desktop.
Analyse Shellskript für Piss Pott mit Racecondition (https://gist.github.com/gists/2851948)
This file contains 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
#!/bin/bash | |
#GNUPLOT WIRD BENOETIGT !!!! | |
#Getestete Ausgabe: | |
# RaceCondition Verhalten | |
# | |
# 30 ++------------+-------------+-------------+-------------+------------++ | |
# ******** + + Raceconditions zu Wartezeit ****** + | |
# | * : : + + | | |
# 25 ++......*............................................................++ | |
# | * : : : : | | |
# | * : : : : | | |
# 20 ++........*..........................................................++ | |
# | * : : : : | | |
# | * : : : : | | |
# 15 ++..........*........................................................++ | |
# | * : : : : | | |
# 10 ++...........*.......................................................++ | |
# | *: : : : | | |
# | ******* : : : | | |
# 5 ++...................*************...................................++ | |
# | : : * ********* : | | |
# + + + **** + * *****************+ | |
# 0 ++------------+-------------+-------------+------****---+------------+* | |
# 0 2 4 6 8 10 | |
# Time (s) | |
# | |
# Aufruf wie folgt: ./this.sh | gnuplot | |
# | |
# getestet mit gnuplot 4.4 patchlevel 3 | |
# | |
for x in {0..300} | |
do | |
if ! ./a.out $x 1&>/dev/null | |
then | |
ergebnis[$[$x/30]]=$[ergebnis[$[$x/30]]+1] | |
fi | |
done | |
echo 'set title "RaceCondition Verhalten"' | |
echo 'set xlabel "Time (s)"' | |
echo 'set ylabel "Angle (mrad)"' | |
echo 'set grid' | |
echo 'set term dumb' | |
for x in {0..10} | |
do | |
echo "$x $[ergebnis[$x]]" >> ergebnis.dat | |
done | |
echo "plot \"ergebnis.dat\" using 1:2 title 'Raceconditions zu Wartezeit' with lines" | |
rm "ergebnis.dat" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment