## 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
## 100000 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 100000 1 1 0 253134 11 48
## 2: 1 100000 1 1 0 253244 9 28
## 3: 1 100000 1 1 0 253314 8 27
## 4: 1 100000 1 1 0 253243 23 5
## 5: 1 100000 1 1 0 253194 16 7
## 6: 1 100000 1 1 0 253323 15 6
## 7: 1 100000 1 1 0 253076 14 6
## 8: 1 100000 1 1 0 253079 13 11
## 9: 1 100000 1 1 0 253128 10 8
## 10: 1 100000 1 1 0 253141 7 8
## Filled Calculated2 Total
## 1: 5 1 65
## 2: 2 7 46
## 3: 9 1 45
## 4: 4 1 33
## 5: 1 5 29
## 6: 4 4 29
## 7: 2 6 28
## 8: 0 4 28
## 9: 9 1 28
## 10: 10 3 28
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 100000 1 1 0 253243 23 5
## 2: 1 100000 1 1 0 253194 16 7
## 3: 1 100000 1 1 0 253183 15 8
## 4: 1 100000 1 1 0 253323 15 6
## 5: 1 100000 1 1 0 253076 14 6
## 6: 1 100000 1 1 0 253079 13 11
## 7: 1 100000 1 1 0 253063 12 6
## 8: 1 100000 1 1 0 253154 12 6
## 9: 1 100000 1 1 0 253102 11 8
## 10: 1 100000 1 1 0 253115 11 7
## Filled Calculated2 Total
## 1: 4 1 33
## 2: 1 5 29
## 3: 4 1 28
## 4: 4 4 29
## 5: 2 6 28
## 6: 0 4 28
## 7: 3 1 22
## 8: 1 4 23
## 9: 4 1 24
## 10: 2 4 24
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 100000 1 1 0 253134 11 48
## 2: 1 100000 1 1 0 253244 9 28
## 3: 1 100000 1 1 0 253314 8 27
## 4: 1 100000 1 1 0 253125 7 12
## 5: 1 100000 1 1 0 253079 13 11
## 6: 1 100000 1 1 0 253304 6 11
## 7: 1 100000 1 1 0 253122 8 10
## 8: 1 100000 1 1 0 253133 7 10
## 9: 1 100000 1 1 0 253178 8 10
## 10: 1 100000 1 1 0 253203 11 10
## Filled Calculated2 Total
## 1: 5 1 65
## 2: 2 7 46
## 3: 9 1 45
## 4: 5 1 25
## 5: 0 4 28
## 6: 3 2 22
## 7: 2 5 25
## 8: 1 4 22
## 9: 4 1 23
## 10: 4 1 26
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 100000 1 1 0 253141 7 8
## 2: 1 100000 1 1 0 253128 10 8
## 3: 1 100000 1 1 0 253314 8 27
## 4: 1 100000 1 1 0 253064 9 9
## 5: 1 100000 1 1 0 253067 8 7
## 6: 1 100000 1 1 0 253068 7 6
## 7: 1 100000 1 1 0 253072 7 6
## 8: 1 100000 1 1 0 253073 7 6
## 9: 1 100000 1 1 0 253075 7 7
## 10: 1 100000 1 1 0 253082 7 9
## Filled Calculated2 Total
## 1: 10 3 28
## 2: 9 1 28
## 3: 9 1 45
## 4: 6 1 25
## 5: 5 2 22
## 6: 5 1 19
## 7: 5 1 19
## 8: 5 2 20
## 9: 5 1 20
## 10: 5 1 22
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.3693731 0.3407590 0.1347941 0.1550738
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')