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

How to measure the test duration in exercise 2? #39

Open
rafiramadhana opened this issue Feb 17, 2024 · 0 comments
Open

How to measure the test duration in exercise 2? #39

rafiramadhana opened this issue Feb 17, 2024 · 0 comments

Comments

@rafiramadhana
Copy link

As mentioned in /2-race-in-cache/README.md

If possible, get your solution down to less than 5 seconds for all tests.

And you also mention to run the test, we run the following command

Use the following command to test for race conditions and correct functionality:

go test -race

Does the "5 second for all tests." should happen when running go test or go test -race?

Because this is what happened in my local

➜  2-race-in-cache git:(main) ✗ go test -race
PASS
ok      github.com/loong/go-concurrency-exercises/2-race-in-cache       5.178s
➜  2-race-in-cache git:(main) ✗ go test      
PASS
ok      github.com/loong/go-concurrency-exercises/2-race-in-cache       4.122s

I'm quite confused if I have passed the 5 seconds threshold or nah

Thanks!

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

No branches or pull requests

1 participant