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

chore(xmlupload): add metrics flag (DEV-1512) #264

Merged
merged 7 commits into from Dec 2, 2022

Conversation

jnussbaum
Copy link
Collaborator

resolves DEV-1512

@jnussbaum jnussbaum self-assigned this Nov 30, 2022
Copy link
Collaborator

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

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

Looks good

@@ -26,6 +28,8 @@
from knora.dsplib.models.xmlresource import XMLResource
from knora.dsplib.utils.shared import try_network_action, validate_xml_against_schema

MetricRecord = namedtuple("MetricRecord", ["res_id", "filetype", "filesize_mb", "event", "duration_microsec", "mb_per_sec"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like this pattern of using a data structure ("product type" in functional terminology) as a model for data in code. Personally I tend to implement this using dataclasses rather than namedtuples... but that's just a matter of taste.

knora/dsplib/utils/xml_upload.py Outdated Show resolved Hide resolved
knora/dsplib/utils/xml_upload.py Outdated Show resolved Hide resolved
Copy link

@irinaschubert irinaschubert left a comment

Choose a reason for hiding this comment

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

LGTM

knora/dsplib/utils/xml_upload.py Outdated Show resolved Hide resolved
@jnussbaum jnussbaum merged commit f4822dc into main Dec 2, 2022
@jnussbaum jnussbaum deleted the wip/dev-1512-introduce-metrics branch December 2, 2022 09:40
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

3 participants