Skip to content

Prio 0.3#321

Draft
FedericoCeratto wants to merge 1 commit into
masterfrom
url-prio-5
Draft

Prio 0.3#321
FedericoCeratto wants to merge 1 commit into
masterfrom
url-prio-5

Conversation

@FedericoCeratto

@FedericoCeratto FedericoCeratto commented Jul 9, 2020

Copy link
Copy Markdown
Contributor

Refactor, improve metrics

(Created grafana dashboard)

Comment thread af/prio/prio.py
@metrics.timer("generate_test_list")
def generate_test_list(country_code: str, category_codes: str, limit: int):
global test_items, last_update_time
global test_items, next_update_time

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if there is a nicer way to do this without having global variables.

Comment thread af/prio/prio.py
}
)
metrics.incr("total_urls_served", count=len(out))
metrics.incr(f"country_code_requested[cc={country_code}]")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is the country_code guaranteed to always be uppercase or lowercase? Do you maybe want to normalise it at the beginning?

@hellais hellais left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Left few nitpick comments, otherwise good to go! 🐳

@FedericoCeratto

Copy link
Copy Markdown
Contributor Author

Superseded by #324

@FedericoCeratto FedericoCeratto marked this pull request as draft November 4, 2020 20:34
@FedericoCeratto FedericoCeratto added the recycle PR to be closed after extracting useful code label Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

recycle PR to be closed after extracting useful code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants