-
-
Notifications
You must be signed in to change notification settings - Fork 270
pcp2openmetrics & pcp2opentelemetry revisions #2676
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -531,14 +531,16 @@ def UCUM_count_prefix(scale): | |||||||||||||||||||
| if units.dimSpace != 1: | ||||||||||||||||||||
| ucum_string += "%d" % units.dimSpace | ||||||||||||||||||||
| first_unit = 0 | ||||||||||||||||||||
| elif units.dimTime: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if units.dimTime: | ||||||||||||||||||||
| if not first_unit: | ||||||||||||||||||||
| ucum_string += "." | ||||||||||||||||||||
| first_unit = 0 | ||||||||||||||||||||
| ucum_string += "%s" % UCUM_time_prefix(units.scaleTime) | ||||||||||||||||||||
| if units.dimTime != 1: | ||||||||||||||||||||
| ucum_string += "%d" % units.dimTime | ||||||||||||||||||||
| elif units.dimCount: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if units.dimCount: | ||||||||||||||||||||
| if not first_unit: | ||||||||||||||||||||
| ucum_string += "." | ||||||||||||||||||||
| first_unit = 0 | ||||||||||||||||||||
|
|
@@ -549,7 +551,8 @@ def UCUM_count_prefix(scale): | |||||||||||||||||||
| ucum_string += "%s{count}" % prefix | ||||||||||||||||||||
| if units.dimCount != 1: | ||||||||||||||||||||
| ucum_string += "%d" % units.scaleCount | ||||||||||||||||||||
| else: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if first_unit: | ||||||||||||||||||||
|
Comment on lines
552
to
+555
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Use Line 553 uses Proposed fix- ucum_string += "%d" % units.scaleCount
+ ucum_string += "%d" % units.dimCount📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
| ucum_string = "1" # dimensionless | ||||||||||||||||||||
|
|
||||||||||||||||||||
| return ucum_string | ||||||||||||||||||||
|
|
@@ -678,6 +681,9 @@ def scope_metric_function(results): | |||||||||||||||||||
| if self.url: | ||||||||||||||||||||
| auth = None | ||||||||||||||||||||
| if self.http_user and self.http_pass: | ||||||||||||||||||||
| if not self.url.lower().startswith("https://"): | ||||||||||||||||||||
| msg = "HTTP Basic Authentication requires an HTTPS connection to prevent leaking credentials." | ||||||||||||||||||||
| sys.stderr.write(msg) | ||||||||||||||||||||
|
Comment on lines
+684
to
+686
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Terminate the warning with a newline.
🤖 Prompt for AI Agents |
||||||||||||||||||||
| auth = requests.auth.HTTPBasicAuth(self.http_user, self.http_pass) | ||||||||||||||||||||
| try: | ||||||||||||||||||||
| timeout = self.http_timeout | ||||||||||||||||||||
|
|
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these changes impact on tests? If not, why not? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@natoscott Looks like its not picked up in the QA test because right now I only have the metric "hinv.ncpu" being tested which is unitless. Should I add a metric or two that has a unit into the QA test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be great. The sample PMDA has heaps of options and is always available in QA, and the metrics are the same for every platform.