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

1/3 Add new perfcounters package that uses perflib #1835

Merged

Conversation

james-bebbington
Copy link
Member

@james-bebbington james-bebbington commented Sep 23, 2020

Link to tracking Issue: #973

Description:
1. Add new perflib package
2. Migrate host metrics scrapers to use new package
3. Remove third_party PDH code

See #1836 for example of usage

@codecov
Copy link

codecov bot commented Sep 23, 2020

Codecov Report

Merging #1835 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1835   +/-   ##
=======================================
  Coverage   91.12%   91.12%           
=======================================
  Files         263      263           
  Lines       16105    16105           
=======================================
  Hits        14675    14675           
  Misses       1003     1003           
  Partials      427      427           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c32f36...d87206b. Read the comment docs.

// MockPerfCounterScraperError returns the supplied errors when Scrape, GetObject,
// or GetValues are called.

type MockPerfCounterScraperError struct {
Copy link
Member

Choose a reason for hiding this comment

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

If this is for testing only and no reason to expose it publicly consider to:
Move it to a file that ends with _test.
Use lower case letter to not expose.

Copy link
Member

Choose a reason for hiding this comment

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

If the intent is to keep it public add struct and funcs comments :)

Copy link
Member Author

Choose a reason for hiding this comment

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

I do want to keep it public as the intent is for this Mock to be used by several different Scraper packages. Added a bunch of comments

@bogdandrutu bogdandrutu merged commit 4a45ae9 into open-telemetry:master Sep 26, 2020
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this pull request Nov 11, 2021
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>

Co-authored-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
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