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

opentelemetry-collector-contrib-8267 Correcting 5m and 15m normalized… #8392

Conversation

shree007
Copy link
Contributor

Description:
wrong 5m and 15m normalized load - using 1m normalized load and normalizing it again

Link to tracking Issue: #8267

@shree007 shree007 requested review from a team and dmitryax as code owners March 13, 2022 15:41
@project-bot project-bot bot added this to In progress in Collector Mar 13, 2022
@dmitryax
Copy link
Member

@shree007 Please add a test case and a changelog entry

@shree007
Copy link
Contributor Author

shree007 commented Mar 13, 2022 via email

@@ -77,8 +77,8 @@ func (s *scraper) scrape(_ context.Context) (pdata.Metrics, error) {
if s.config.CPUAverage {
divisor := float64(runtime.NumCPU())
avgLoadValues.Load1 = avgLoadValues.Load1 / divisor
avgLoadValues.Load5 = avgLoadValues.Load1 / divisor
avgLoadValues.Load15 = avgLoadValues.Load1 / divisor
avgLoadValues.Load5 = avgLoadValues.Load5 / divisor
Copy link
Contributor

@anuraaga anuraaga Mar 14, 2022

Choose a reason for hiding this comment

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

Can you add a unit test to verify this change / regressions?

Edit: Sorry realized I repeated @dmitryax's comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

Copy link
Contributor

Choose a reason for hiding this comment

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

Respectfully, there is a unit test: it verifies the data is present.

Leaving the code wrong to berate the contributor for not working out how to make a test that calculates a 15 minute average seems like an unnecessary harm.

…ntrib into opentelemetry-collector-contrib-8267
@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2022

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Apr 3, 2022
@shree007
Copy link
Contributor Author

shree007 commented Apr 3, 2022 via email

@dmitryax dmitryax removed the Stale label Apr 4, 2022
…ntrib into opentelemetry-collector-contrib-8267
@shree007
Copy link
Contributor Author

shree007 commented Apr 8, 2022

@dmitryax I am seeing that Test case is aleady here
If there is any specific thing you want me to check, please let me know.

@dmitryax
Copy link
Member

dmitryax commented Apr 8, 2022

If there is any specific thing you want me to check, please let me know.

The test must be incorrect if if didn't catch this issue. Please update the test and make sure it's failing without your fix.

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Apr 23, 2022
@sodabrew
Copy link
Contributor

sodabrew commented May 2, 2022

Any news on this PR? Looks like a pretty straightforward fix. The current unit test simply looks that data exists and not that the data is correct. Perhaps the test suite should run for 15 minutes to generate enough data points to test the average?

@dmitryax
Copy link
Member

dmitryax commented May 2, 2022

@sodabrew help would be appreciated. Feel free to take it if from here if you have a chance

@github-actions github-actions bot removed the Stale label May 3, 2022
…ntrib into opentelemetry-collector-contrib-8267
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 3, 2022

CLA Missing ID CLA Not Signed

@shree007
Copy link
Contributor Author

shree007 commented May 3, 2022

@dmitryax @sodabrew I have reverted my changes to validate test case As discussed in this thread. I am keeping an eye on it.
Sorry for inactivity, I was on leave and away from keyboard.

@shree007 shree007 force-pushed the opentelemetry-collector-contrib-8267 branch from f4ef8a3 to e8aa34d Compare May 9, 2022 06:35
@sodabrew
Copy link
Contributor

Looks like this didn't make the 0.51 release.

@shree007
Copy link
Contributor Author

@sodabrew there is multiple test is being failed, I need to look into it. Please feel free to take over if you have bandwidth.

@sodabrew
Copy link
Contributor

sodabrew commented May 25, 2022

@shree007 Could you simply rebase this PR to current master? The test failures look unrelated to your change. It would be nice if @codeboten could merge this for 0.52 tomorrow

@shree007 Are you able to complete the CLA? If not, then I don't mind resubmitting my own changes to effect the same fix.

@sodabrew
Copy link
Contributor

The test for this that could even have been updated was just disabled in #10030

@shree007
Copy link
Contributor Author

shree007 commented May 25, 2022 via email

@sodabrew
Copy link
Contributor

sodabrew commented Jun 7, 2022

Got my version landed in #10301! Thanks again for this PR that got it started! Please do try a current build to double-check that it works for you

@djaglowski
Copy link
Member

Closing this, as it appears to have been addressed by #10301

@djaglowski djaglowski closed this Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Collector
  
In progress
Development

Successfully merging this pull request may close these issues.

None yet

5 participants