proj: Add perf/
This commit is contained in:
22
proj/perf/test.sh
Executable file
22
proj/perf/test.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
REPEAT=30
|
||||
CYCLES=50
|
||||
|
||||
function test() {
|
||||
echo $@
|
||||
for c in $(seq 1 $CYCLES); do
|
||||
for i in $(seq 1 $REPEAT); do
|
||||
echo "cycles: $((c * 100)) ($i/$REPEAT)"
|
||||
$@ $((c * 100))
|
||||
sleep 1
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
test ./main
|
||||
cd ../intercept
|
||||
test ./intercept -o -i - -- ../perf/main
|
||||
test ./intercept -o -i stderr -- ../perf/main
|
||||
test ./intercept -o -i file:out.log -- ../perf/main
|
||||
#test ./intercept -o -i unix:/ -- ../perf/main
|
||||
Reference in New Issue
Block a user