File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ def get_rate(phase):
24
24
return 1.25 ** (phase )* TXNS_PER_SEC
25
25
26
26
def normal ():
27
+ np .random .seed (0 )
27
28
print ("Max Txns Per Sec %f" % TXNS_PER_SEC )
28
29
backlog = 0
29
30
results_unconfirmed = [0 ]* SAMPLES
@@ -43,6 +44,7 @@ def normal():
43
44
results_unconfirmed [i ] = backlog / AVG_TX
44
45
return results_unconfirmed , np .cumsum (total_time )/ (60 * 60 * 24.0 )
45
46
def compressed (rate_multiplier = 1 ):
47
+ np .random .seed (0 )
46
48
print ("Max Txns Per Sec %f" % TXNS_PER_SEC )
47
49
backlog = 0
48
50
secondary_backlog = 0
@@ -54,7 +56,7 @@ def compressed(rate_multiplier = 1):
54
56
total_time = [0 ]* (SAMPLES )
55
57
for phase in range (PHASES ):
56
58
for i in range (PHASE_LENGTH * phase , PHASE_LENGTH * (1 + phase )):
57
- block_time = np .random .poisson (AVG_INTERVAL )
59
+ block_time = np .random .exponential (AVG_INTERVAL )
58
60
total_time [i ] = block_time
59
61
txns = np .random .poisson (rate_multiplier * get_rate (phase )* block_time )
60
62
postponed = txns * COMPRESSABLE
You can’t perform that action at this time.
0 commit comments