Result
BenchmarkClean_MockDB-12 1000 219069 ns/op
BenchmarkClean_SQLite_File-12 1000 767908 ns/op
BenchmarkClean_SQLite_Memory-12 1000 40080 ns/op
BenchmarkTRM_MockDB-12 1000 219373 ns/op
BenchmarkTRM_SQLite_File-12 1000 711622 ns/op
BenchmarkTRM_SQLite_Memory-12 1000 35139 ns/op
sqlite in memory
trm (ns) |
clean (ns) |
diff (ns) |
percent |
35072 |
29731 |
5341 |
17,96441425 |
34787 |
29422 |
5365 |
18,23465434 |
35060 |
29376 |
5684 |
19,34912854 |
33452 |
29760 |
3692 |
12,40591398 |
33616 |
29529 |
4087 |
13,84063124 |
34659 |
29746 |
4913 |
16,51650642 |
35262 |
29365 |
5897 |
20,08172995 |
35879 |
29611 |
6268 |
21,16780926 |
35252 |
29572 |
5680 |
19,20735831 |
34959 |
29474 |
5485 |
18,60962204 |
Different (ns)
Min: 3692; Max: 6268 ; Avg: 5241,2.
Percent
Min: 12,40591398; Max: 21,16780926; Avg: 17,73777683.
sqlite in file
trm (ns) |
clean (ns) |
diff (ns) |
percent |
676482 |
671696 |
4786 |
0,7125247136 |
693563 |
724816 |
-31253 |
-4,311852939 |
723735 |
717628 |
6107 |
0,8509980101 |
706655 |
700489 |
6166 |
0,8802422308 |
696003 |
699445 |
-3442 |
-0,4921044542 |
720715 |
651730 |
68985 |
10,58490479 |
665267 |
690248 |
-24981 |
-3,619133992 |
654501 |
675858 |
-21357 |
-3,15998331 |
685381 |
660482 |
24899 |
3,769822645 |
707341 |
696287 |
11054 |
1,587563749 |
Different (ns)
Min: -31253; Max: 68985; Avg: 4096,4.
Percent
Min: -4,311852939; Max: 10,58490479; Avg: 0,6802981444.
sqlmock
trm (ns) |
clean (ns) |
diff (ns) |
percent |
1535375 |
1505887 |
29488 |
1,958181457 |
1547326 |
1499356 |
47970 |
3,199373598 |
1600213 |
1467423 |
132790 |
9,04919713 |
1501681 |
1458198 |
43483 |
2,981968155 |
1483853 |
1458583 |
25270 |
1,732503395 |
1501300 |
1466810 |
34490 |
2,351361117 |
1493554 |
1465913 |
27641 |
1,885582569 |
1490446 |
1480484 |
9962 |
0,6728880555 |
1545214 |
1468073 |
77141 |
5,254575215 |
1540373 |
1468896 |
71477 |
4,866035444 |
Different (ns)
Min: 9962; Max: 132790; Avg: 49971,2.
Percent
Min: 0,6728880555; Max: 9,04919713; Avg: 3,395166614.
Conclusion
TRM decreases performance about 11% but filesystem or network connection takes significantly longer than TRM.