File: run_perf

package info (click to toggle)
task 2.5.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,588 kB
  • ctags: 8,723
  • sloc: cpp: 36,161; python: 11,324; perl: 8,697; ansic: 7,400; sh: 673; makefile: 19
file content (53 lines) | stat: -rwxr-xr-x 1,440 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! /bin/bash

echo 'Performance: setup'
rm -f ./pending.data ./completed.data ./undo.data ./backlog.data perf.rc
if [[ -e data/pending.data && -e data/completed.data ]]
then
  echo '  - Using existing data'
  cp data/* .
else
  echo '  - This step will take several minutes'
  ./load
  mkdir -p data
  cp *.data perf.rc data
fi

# Allow override.
if [[ -z $TASK ]]
then
  TASK=../src/task
fi

# Run benchmarks.
# Note that commands are run twice - warm cache testing.

echo 'Performance: benchmarks'

echo '  - task next...'
$TASK rc.debug:1 rc:perf.rc next >/dev/null 2>&1
$TASK rc.debug:1 rc:perf.rc next 2>&1 | grep "Perf task"

echo '  - task list...'
$TASK rc.debug:1 rc:perf.rc list >/dev/null 2>&1
$TASK rc.debug:1 rc:perf.rc list 2>&1 | grep "Perf task"

echo '  - task all...'
$TASK rc.debug:1 rc:perf.rc all >/dev/null 2>&1
$TASK rc.debug:1 rc:perf.rc all 2>&1 | grep "Perf task"

echo '  - task add...'
$TASK rc.debug:1 rc:perf.rc add >/dev/null 2>&1
$TASK rc.debug:1 rc:perf.rc add This is a task with an average sized description length project:P priority:H +tag1 +tag2 2>&1 | grep "Perf task"

echo '  - task export...'
$TASK rc.debug:1 rc:perf.rc export >/dev/null 2>&1
$TASK rc.debug:1 rc:perf.rc export 2>&1 >export.json | grep "Perf task"

echo '  - task import...'
rm -f ./pending.data ./completed.data ./undo.data ./backlog.data
$TASK rc.debug:1 rc:perf.rc import export.json 2>&1 | grep "Perf task"

echo 'End'
exit 0