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

metrics: fix TestExpDecaySampleNanosecondRegression sometimes failed #29832

Merged
merged 1 commit into from
May 24, 2024

Conversation

Halimao
Copy link
Contributor

@Halimao Halimao commented May 24, 2024

TestExpDecaySampleNanosecondRegression will fail sometimes

Found this issue in ci job

--- FAIL: TestExpDecaySampleNanosecondRegression (0.00s)
    sample_test.go:144: out of range [14, 16]: 13.9


It hasn't always failed, I ran it on my local machine, and it's mostly been passed.

The problem is the test case using 100 as sample reservoirSize, which is a bit small.

  • If we use 100 as reservoirSize and run the test 1000 times, it will most likely be failed.
  • If we use 1000 as reservoirSize and run the test 10000 times, it will most likely be successful, I haven't failed at least

Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

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

LGTM.

I ran the stress test locally and it can indeed capture the failure after running 2minutes.

/var/folders/sm/ytlmy_n92dnc2sxp8c5g9bhr0000gn/T/go-stress-20240524T151135-281253435
--- FAIL: TestExpDecaySampleNanosecondRegression (0.00s)
    sample_test.go:144: out of range [14, 16]: 16.1
FAIL


ERROR: exit status 1

1m40s: 136 runs so far, 1 failures (0.74%)

/var/folders/sm/ytlmy_n92dnc2sxp8c5g9bhr0000gn/T/go-stress-20240524T151135-3139478043
--- FAIL: TestExpDecaySampleNanosecondRegression (0.00s)
    sample_test.go:144: out of range [14, 16]: 13.9
FAIL

After switching to the new parameters, it can run without issue.

4m45s: 400 runs so far, 0 failures
4m50s: 408 runs so far, 0 failures
4m55s: 408 runs so far, 0 failures
5m0s: 416 runs so far, 0 failures
5m5s: 424 runs so far, 0 failures
5m10s: 432 runs so far, 0 failures
5m15s: 440 runs so far, 0 failures
5m20s: 448 runs so far, 0 failures

@rjl493456442 rjl493456442 added this to the 1.14.4 milestone May 24, 2024
@rjl493456442 rjl493456442 merged commit 08fe6a8 into ethereum:master May 24, 2024
3 checks passed
@Halimao Halimao deleted the fix/metrics-test branch May 24, 2024 08:07
jorgemmsilva pushed a commit to iotaledger/go-ethereum that referenced this pull request Jun 17, 2024
stwiname pushed a commit to subquery/data-node-go-ethereum that referenced this pull request Sep 9, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 10, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 10, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 10, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Dec 13, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Dec 16, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Dec 16, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Dec 20, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Dec 20, 2024
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request Dec 22, 2024
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.

2 participants