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

For logging multiple values #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

rajcscw
Copy link
Member

@rajcscw rajcscw commented Aug 8, 2020

If measurement_id is not provided, we can just append the values to the existing values. Therefore, the user can cache the metrics and log once in a while to save IO.

src/dashify/logging/dashify_logging.py Outdated Show resolved Hide resolved
@@ -218,9 +218,7 @@ def _merge_dictionaries(dict_1: Dict[str, List[Any]], dict_2: Dict[str, List[Any
merged[key] = merged[key][:measurement_id] + dict_2[key] + merged[key][
Copy link
Contributor

@le1nux le1nux Aug 10, 2020

Choose a reason for hiding this comment

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

if measurement_id is None, we can set it to len(merged[key]) and get rid of the else statement, right?

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 think so, the third addendum in merged[key] = merged[key][:measurement_id] + dict_2[key] + merged[key][measurement_id + len(dict_2[key]) - 1:] is a bit confusing to me though. So, is the idea with this line to rewrite the past measurements?

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.

None yet

2 participants