-
Notifications
You must be signed in to change notification settings - Fork 42
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
added costs as a column to tracking databases #664
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quick note
added testing of usage metrics and costs
@@ -174,6 +174,8 @@ def test_basic(self, tmp_path, job_manager, job_manager_root_dir, sleep_mock): | |||
("job-2022", "finished", "foo"), | |||
] | |||
|
|||
assert not pd.read_csv(job_db_path)[["cpu", "memory", "duration", "costs"]].isnull().any().any() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks quite cryptic. Can't you assert with real values. All values are predictable, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The values are predictable however also well hidden in the _testing.py file (which isn't in the testing folder but still rests under the src of openeo)
# TODO: move to openeo.testing |
This is why I chose to simply check that the values are not none.
Would it help to add a comment # check that the columns "cpu", "memory", "duration" and "costs" of finished jobs are not empty
or do you prefer to check on the actual values and add a comment referencing where they are defined? (last option does hold the danger that when the _testing.py file is moved this comment won't be updated)
Third option of course would be to immediately move the _testing.py file in this PR
#588