Skip to content

Commit

Permalink
telegram: use common begin time, bump timeout
Browse files Browse the repository at this point in the history
We want all network events and other events used by telegram to use the
same common begin of time, so we can correlate events.

While there, bump timeout to 60 seconds.

Part of #55.
  • Loading branch information
bassosimone committed Jun 29, 2020
1 parent df37567 commit 02aac97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions experiment/telegram/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

const (
testName = "telegram"
testVersion = "0.1.0"
testVersion = "0.1.1"
)

// Config contains the telegram experiment config.
Expand Down Expand Up @@ -99,7 +99,7 @@ func (m measurer) ExperimentVersion() string {

func (m measurer) Run(ctx context.Context, sess model.ExperimentSession,
measurement *model.Measurement, callbacks model.ExperimentCallbacks) error {
ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
ctx, cancel := context.WithTimeout(ctx, 60*time.Second)
defer cancel()
urlgetter.RegisterExtensions(measurement)
inputs := []urlgetter.MultiInput{
Expand All @@ -118,7 +118,7 @@ func (m measurer) Run(ctx context.Context, sess model.ExperimentSession,
{Target: "http://web.telegram.org/", Config: urlgetter.Config{Method: "GET"}},
{Target: "https://web.telegram.org/", Config: urlgetter.Config{Method: "GET"}},
}
multi := urlgetter.Multi{Session: sess}
multi := urlgetter.Multi{Begin: time.Now(), Session: sess}
testkeys := NewTestKeys()
testkeys.Agent = "redirect"
measurement.TestKeys = testkeys
Expand Down

0 comments on commit 02aac97

Please sign in to comment.