Statistics
| Branch: | Tag: | Revision:

sssimulator / Test / test-nobuf.sh @ f1158e5c

History | View | Annotate | Download (1.07 KB)

1
#!/bin/bash
2

    
3
SRCDIR=`pwd`/..
4
BUILDDIR=`pwd`/Build
5

    
6
function source_clean()
7
{
8
  rm -rf $BUILDDIR
9
}
10

    
11
function compile()
12
{
13
  echo ChunkSched: $1 PeerSched: $2 >> $3
14
  ORIGDIR=`pwd`
15
  mkdir -p $BUILDDIR
16
  cd       $BUILDDIR
17
  make -f $SRCDIR/Makefile SRC=$SRCDIR NO_BUFF=1 CHUNK_SCHED=$1 PEER_SCHED=$2
18
  cd       $ORIGDIR
19
}
20

    
21
function test()
22
{
23
  echo $2 chunks on $1 peers, $3 neighbours per peer  >> $4
24
  (time $BUILDDIR/sssim -c $2 -n $1 -o $3 >> $4)     2>> $4
25
  echo
26
  echo
27
}
28

    
29
function run_tests()
30
{
31
  source_clean
32
  compile $1 $2 $3
33

    
34
  test 256 600 256 $3
35
  test 200 600 200 $3
36
  test 500 600 500 $3
37

    
38
  test 256 600 10 $3
39
  test 200 600 10 $3
40
  test 500 600 10 $3
41

    
42
  test 256 600 20 $3
43
  test 200 600 20 $3
44
  test 500 600 20 $3
45
}
46

    
47

    
48
run_tests latest_useful_chunk ch_useful_peer_random results
49
run_tests dl_sched            ch_useful_peer_random results
50
run_tests random_useful_chunk ch_useful_peer_random results
51
run_tests latest_useful_chunk ch_earliest_free_peer results
52
run_tests dl_sched            ch_earliest_free_peer results
53
run_tests random_useful_chunk ch_earliest_free_peer results
54