Skip to content

Commit 85911b1

Browse files
committed
Change random function to exponential distribution.
1 parent 04eef83 commit 85911b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def hello_world():
3232
@IN_PROGRESS.track_inprogress()
3333
def slow_request():
3434
REQUESTS.labels(method='GET', endpoint="/slow").inc()
35-
v = random.random()
35+
v = random.expovariate(1.0 / 1.3)
3636
time.sleep(v)
3737
return render_template_string('<h1>Wow, that took {{v}} s!</h1>', v=v)
3838

0 commit comments

Comments
 (0)