File: run-benchmarks.sh

package info (click to toggle)
libatomic-queue 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,336 kB
  • sloc: cpp: 1,704; javascript: 368; makefile: 126; ansic: 91; python: 82; sh: 60
file content (20 lines) | stat: -rwxr-xr-x 517 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash -x

# Copyright (c) 2019 Maxim Egorushkin. MIT License. See the full licence in file LICENSE.

now=$(date --utc +%Y%m%dT%H%M%S)
cpucount=$(grep -c ^processor /proc/cpuinfo)
exe="$(dirname "$0")/../benchmarks"

function benchmark() {
    lb="/usr/bin/stdbuf -oL"
    let N=${N:33}
    for((i=1;i<=N;++i)); do
        $lb echo -n "[$i/$N] "
        sudo chrt -f 50 "$exe"
    done
}

$(dirname "$0")/benchmark-prologue.sh
benchmark | tee results-${cpucount}.${now}.txt
$(dirname "$0")/benchmark-epilogue.sh