Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Fix bugs in stats library#246

Merged
liyanhui1228 merged 5 commits intocensus-instrumentation:masterfrom
liyanhui1228:fix_stats
Aug 4, 2018
Merged

Fix bugs in stats library#246
liyanhui1228 merged 5 commits intocensus-instrumentation:masterfrom
liyanhui1228:fix_stats

Conversation

@liyanhui1228
Copy link
Copy Markdown
Contributor

Fixes #226 #227

Comment thread opencensus/stats/aggregation_data.py Outdated
self._max = max_
self._sum_of_sqd_deviations = sum_of_sqd_deviations
if bounds is None:
bounds = [0]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can leave bounds and counts_per_bucket as None since they are optional.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see, you can leave the bounds as an empty list then.

Comment thread examples/stats/helloworld/main.py Outdated
@@ -61,6 +61,9 @@ def main():
# Get aggregated stats and print it to console.
view_data = view_manager.get_view(VIDEO_SIZE_VIEW_NAME)
pprint(vars(view_data)) # TODO: print more meaningful info for view_data
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This TODO can be removed now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Copy link
Copy Markdown
Contributor

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

LGTM

@liyanhui1228 liyanhui1228 merged commit 6ba99d5 into census-instrumentation:master Aug 4, 2018
@liyanhui1228 liyanhui1228 deleted the fix_stats branch August 4, 2018 01:49
MarceloAquino7 pushed a commit to CESARBR/opencensus-python that referenced this pull request Aug 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants