-
Notifications
You must be signed in to change notification settings - Fork 1
/
generate-results.sh
executable file
·57 lines (49 loc) · 2.33 KB
/
generate-results.sh
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
54
55
56
57
#!/usr/bin/env bash
cat << EOF > /tmp/summarise.R
# Import data results
testName <- "$1"
dataResults <- read.csv('~/BT-Results/results.csv', header = FALSE)
colnames(dataResults) <- c("Benchmark", "Label", "Distro", "Kernel", "Date", "Test", "Result", "Validation", "Instructions", "Cycles", "ContextSwitches","L1Misses", "CacheRefs", "CacheMisses", "Branches", "BranchMisses")
Merged <- paste(dataResults\$Benchmark, dataResults\$Label, dataResults\$Distro, dataResults\$Kernel, dataResults\$Date, dataResults\$Test)
dataResults <- cbind(dataResults, Merged)
dataUnique <- unique(dataResults\$Merged)
for( index in 1:length(dataUnique) )
{
tmp <- subset(dataResults, Merged == dataUnique[index])
tmpSubset <- tmp[1,c("Benchmark", "Label", "Distro", "Kernel", "Date", "Test", "Merged")]
tmpSubset\$Result <- round(mean(tmp\$Result),3)
tmpSubset\$RSD <- round(sd(tmp\$Result),3)
tmpSubset\$Instructions <- round(mean(tmp\$Instructions))
tmpSubset\$ISD <- round(sd(tmp\$Instructions))
tmpSubset\$Cycles <- round(mean(tmp\$Cycles))
tmpSubset\$ContextSwitches <- round(mean(tmp\$ContextSwitches))
tmpSubset\$L1Misses <- round(mean(tmp\$L1Misses))
tmpSubset\$CacheRefs <- round(mean(tmp\$CacheRefs))
tmpSubset\$CacheMisses <- round(mean(tmp\$CacheMisses))
tmpSubset\$Branches <- round(mean(tmp\$Branches))
tmpSubset\$BranchMisses <- round(mean(tmp\$BranchMisses))
if ( length(unique(tmp\$Validation)) == 1 ){
tmpSubset\$Valid <- unique(tmp\$Validation)
} else {
tmpSubset\$Valid <- NA
}
Variables <- c("Benchmark", "Label", "Distro", "Kernel", "Date", "Test", "Result", "RSD", "Instructions", "ISD", "Cycles", "ContextSwitches", "L1Misses", "CacheRefs", "CacheMisses", "Branches", "BranchMisses", "Valid")
if( exists("dataCombined") ) {
dataCombined <- rbind(dataCombined, tmpSubset[, Variables])
} else {
dataCombined <- tmpSubset[, Variables]
}
}
if ( testName != "" )
{
dataCombined <- subset(dataCombined, Benchmark == testName)
}
write.csv(dataCombined[order(dataCombined\$Benchmark, dataCombined\$Test, dataCombined\$Label),], '/tmp/summarise.csv', row.names = FALSE)
options(width=1000)
print(dataCombined[order(dataCombined\$Benchmark, dataCombined\$Test, dataCombined\$Label),])
EOF
Rscript /tmp/summarise.R
echo ""
echo ""
echo ""
cat /tmp/summarise.csv