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

Add classes to model pod metrics and project invoices. #78

Merged
merged 1 commit into from
Oct 3, 2024

Commits on Oct 3, 2024

  1. Add classes to model pod metrics and project invoices.

    The class `Pod` represent a pod's metrics and exposes methods to get the
    service unit and runtime of a pod. The service unit information is returned as
    a namedtuples. The method to get runtime will allow us to ignore certain
    hours, though, that will be added in a later commit.
    
    The class `ProjectInvoice` represents invoice data for a project. It has a
    method that takes in a pod and aggregates it's usage data. Another method
    `generate_invoice_rows` will return the csv data to be exported.
    
    The caller write_metrics_by_namespace has been updated to use these new classes.
    
    Tests have been updated to work with the new changes. There's some duplicate
    constants that I will sort in the next few commits.
    naved001 committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    d93b2d7 View commit details
    Browse the repository at this point in the history