## Loading required package: data.table
## Loading required package: ggplot2
Number of executed orders by account and ReqPerSec
table(d$Account, d$OPS_Req, d$TestNumber)
## , , = 1
##
##
## 1
## 100011 300
print("Top longest execution")
## [1] "Top longest execution"
print(d[order(-Total)][1:10,])
## TestNumber Account OPS_Req OPS_Mean OPS_Sd Order New Calculated1
## 1: 1 100011 1 1 0 5158002 472 351
## 2: 1 100011 1 1 0 5158017 4 32
## 3: 1 100011 1 1 0 5158117 7 19
## 4: 1 100011 1 1 0 5158058 12 20
## 5: 1 100011 1 1 0 5158005 4 15
## 6: 1 100011 1 1 0 5158266 4 27
## 7: 1 100011 1 1 0 5158191 18 2
## 8: 1 100011 1 1 0 5158007 13 14
## 9: 1 100011 1 1 0 5158052 12 15
## 10: 1 100011 1 1 0 5158139 5 9
## Filled Calculated2 Total
## 1: 30 12 865
## 2: 0 3 39
## 3: 0 11 37
## 4: 0 3 35
## 5: 0 15 34
## 6: 0 3 34
## 7: 0 13 33
## 8: 0 5 32
## 9: 0 5 32
## 10: 0 18 32
print("Worst New execution")
## [1] "Worst New execution"
print(d[order(-New)][1:10,])
## TestNumber Account OPS_Req OPS_Mean OPS_Sd Order New Calculated1
## 1: 1 100011 1 1 0 5158002 472 351
## 2: 1 100011 1 1 0 5158191 18 2
## 3: 1 100011 1 1 0 5158203 17 7
## 4: 1 100011 1 1 0 5158226 16 10
## 5: 1 100011 1 1 0 5158298 15 1
## 6: 1 100011 1 1 0 5158070 14 10
## 7: 1 100011 1 1 0 5158274 14 7
## 8: 1 100011 1 1 0 5158007 13 14
## 9: 1 100011 1 1 0 5158082 13 8
## 10: 1 100011 1 1 0 5158239 13 10
## Filled Calculated2 Total
## 1: 30 12 865
## 2: 0 13 33
## 3: 0 5 29
## 4: 0 4 30
## 5: 0 2 18
## 6: 0 4 28
## 7: 0 2 23
## 8: 0 5 32
## 9: 0 1 22
## 10: 0 2 25
print("Worst Calculated1 execution")
## [1] "Worst Calculated1 execution"
print(d[order(-Calculated1)][1:10,])
## TestNumber Account OPS_Req OPS_Mean OPS_Sd Order New Calculated1
## 1: 1 100011 1 1 0 5158002 472 351
## 2: 1 100011 1 1 0 5158017 4 32
## 3: 1 100011 1 1 0 5158266 4 27
## 4: 1 100011 1 1 0 5158159 5 23
## 5: 1 100011 1 1 0 5158204 5 21
## 6: 1 100011 1 1 0 5158058 12 20
## 7: 1 100011 1 1 0 5158117 7 19
## 8: 1 100011 1 1 0 5158295 9 19
## 9: 1 100011 1 1 0 5158179 9 18
## 10: 1 100011 1 1 0 5158096 5 17
## Filled Calculated2 Total
## 1: 30 12 865
## 2: 0 3 39
## 3: 0 3 34
## 4: 0 0 28
## 5: 0 0 26
## 6: 0 3 35
## 7: 0 11 37
## 8: 0 2 30
## 9: 0 2 29
## 10: 0 0 22
print("Worst Filled execution")
## [1] "Worst Filled execution"
print(d[order(-Filled)][1:10,])
## TestNumber Account OPS_Req OPS_Mean OPS_Sd Order New Calculated1
## 1: 1 100011 1 1 0 5158002 472 351
## 2: 1 100011 1 1 0 5158105 6 11
## 3: 1 100011 1 1 0 5158187 4 11
## 4: 1 100011 1 1 0 5158236 7 9
## 5: 1 100011 1 1 0 5158283 8 9
## 6: 1 100011 1 1 0 5158043 4 6
## 7: 1 100011 1 1 0 5158061 3 5
## 8: 1 100011 1 1 0 5158071 8 6
## 9: 1 100011 1 1 0 5158247 5 7
## 10: 1 100011 1 1 0 5158010 6 9
## Filled Calculated2 Total
## 1: 30 12 865
## 2: 7 0 24
## 3: 7 0 22
## 4: 4 0 20
## 5: 4 0 21
## 6: 3 0 13
## 7: 2 0 10
## 8: 2 2 18
## 9: 2 0 14
## 10: 1 2 18
print("Proprtion delay for each execution staqge")
## [1] "Proprtion delay for each execution staqge"
print ( apply( apply(d[,7:10, with=F], 1, prop.table), 1, mean) )
## New Calculated1 Filled Calculated2
## 0.376272638 0.482238594 0.007660185 0.133828583
Summary execution time ~ requested orders per second
d[,OPS_Req:=OPS_Req * TestNumber]
d[,OPS_Mean:=OPS_Mean * TestNumber]
si<-rbind( tapply(d$Total, d$OPS_Req, length),
tapply(d$Total, d$OPS_Req, min),
tapply(d$Total, d$OPS_Req, mean),
tapply(d$Total, d$OPS_Req, median),
tapply(d$Total, d$OPS_Req, max),
tapply(d$Total, d$OPS_Req, sd))
rownames(si)<-c("length", "min", "mean", "median", "max", "sd")
si<-round(t(si))
ggplot(melt(si), aes(Var1, value)) + geom_point() + facet_grid(Var2 ~ ., scales = "free") + xlab("Requested Orders Per Second")
Scaling
ggplot( d, aes(x=OPS_Req, y=OPS_Mean)) + geom_line() + geom_abline(intercept = 0, slope = 1, size=2, color='red')