Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the global start time when the first connection is established #28

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

robertodauria
Copy link
Contributor

@robertodauria robertodauria commented Oct 31, 2023

This makes sure that we are only counting the elapsed time after at least one stream has started.


This change is Reviewable

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6706749025

  • 0 of 19 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.8%) to 70.067%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/client/client.go 0 19 0.0%
Totals Coverage Status
Change from base Build 6357457566: -0.8%
Covered Lines: 838
Relevant Lines: 1196

💛 - Coveralls

Copy link
Contributor

@stephen-soltesz stephen-soltesz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to test these changes?

Reviewable status: 0 of 1 approvals obtained (waiting on @robertodauria)


pkg/client/client.go line 90 at r1 (raw file):

	recvByteCountersMutex sync.Mutex

	globalStartTime     time.Time

Calling a struct field "global" is a misnomer. Is this just startTime for this client instance?

Copy link
Contributor Author

@robertodauria robertodauria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 approvals obtained (waiting on @stephen-soltesz)


pkg/client/client.go line 90 at r1 (raw file):

Previously, stephen-soltesz (Stephen Soltesz) wrote…

Calling a struct field "global" is a misnomer. Is this just startTime for this client instance?

It's the common start time that all the streams started by this client share for the purpose of computing the aggregate goodput. sharedStartTime or just startTime?

Copy link
Contributor

@stephen-soltesz stephen-soltesz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 approvals obtained (waiting on @robertodauria)


pkg/client/client.go line 90 at r1 (raw file):

Previously, robertodauria (Roberto D'Auria) wrote…

It's the common start time that all the streams started by this client share for the purpose of computing the aggregate goodput. sharedStartTime or just startTime?

👍

sharedStartTime works for me.

The test timeout now starts when the first connection is established.
Copy link
Contributor Author

@robertodauria robertodauria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I refactored the code a bit to make testing easier in the future, but did not have time to add tests in this PR. Will add them when I'm back in January, if that works for you.

Reviewable status: 0 of 1 approvals obtained (waiting on @stephen-soltesz)


pkg/client/client.go line 90 at r1 (raw file):

Previously, stephen-soltesz (Stephen Soltesz) wrote…

👍

sharedStartTime works for me.

Done.

Copy link
Contributor

@stephen-soltesz stephen-soltesz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@robertodauria robertodauria merged commit 3efa63b into main Dec 6, 2023
7 checks passed
@robertodauria robertodauria deleted the global-start-time branch December 6, 2023 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants