-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-lat.sh
More file actions
executable file
·52 lines (42 loc) · 1.18 KB
/
test-lat.sh
File metadata and controls
executable file
·52 lines (42 loc) · 1.18 KB
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
#!/bin/bash
TLPPERF=$(cd $(dirname $0); pwd)/../libtlp/apps/tlpperf
OUTPUTDIR=$(cd $(dirname $0); pwd)/output-lat
NETTLP_NIC_ADDR=192.168.10.1
# parameters must be changed in accordance with TLP NIC host
# DMA_REGION_ADDR and size is decided by tlpperf -S
NETTLP_NIC_BUS=1b:00
DMA_REGION_ADDR=0x747400000
DMA_REGION_SIZE=8392704
# parameters for testing
DURATION=2
LAT_MSMT_COUNT=10000
directions=(read)
dma_lens=(1 4 8 16 32 64 128 256 512 1024)
cpu_nums=(1)
patterns=(fix seq random)
iter=0
niter=$(( ${#directions[@]} * ${#patterns[@]} * ${#dma_lens[@]} * ${#cpu_nums[@]} ))
for direction in ${directions[@]}; do
for pattern in ${patterns[@]}; do
for dma_len in ${dma_lens[@]}; do
for cpu_num in ${cpu_nums[@]}; do
iter=$(( $iter + 1 ))
cmd=""
cmd+="$TLPPERF -r $NETTLP_NIC_ADDR -b $NETTLP_NIC_BUS"
cmd+=" -a $DMA_REGION_ADDR -s $DMA_REGION_SIZE"
cmd+=" -d $direction -L $dma_len"
cmd+=" -N $cpu_num -R diff -P $pattern"
cmd+=" -t $DURATION"
cmd+=" -M -c $LAT_MSMT_COUNT"
out=""
out+="$OUTPUTDIR/${direction}_pattern-${pattern}_"
out+="dmalen-${dma_len}_cpu-${cpu_num}.txt"
echo Test No $iter / $niter
echo Command: $cmd
echo Output: $out
echo
$cmd > $out
done
done
done
done