add basic usage report - #1495
Conversation
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1495 +/- ##
===========================================
+ Coverage 89.20% 89.62% +0.42%
===========================================
Files 103 106 +3
Lines 3732 3953 +221
Branches 460 485 +25
===========================================
+ Hits 3329 3543 +214
- Misses 326 331 +5
- Partials 77 79 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ub.com/ssl-hep/ServiceX into 1478-download-usage-report-as-csv-file
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…ub.com/ssl-hep/ServiceX into 1478-download-usage-report-as-csv-file
ponyisi
left a comment
There was a problem hiding this comment.
See the one thing, otherwise looks good to me
| UserModel.institution.label("Institution"), | ||
| TransformRequest.submit_time.label("Run Time"), | ||
| ) | ||
| .join(TransformRequest, TransformRequest.submitted_by == UserModel.id) |
There was a problem hiding this comment.
Hmm.. I wonder if there still needs to be a limit here in cases of large TransformRequest tables. How much memory do pods usually have in prod?
There was a problem hiding this comment.
I changed SqlCsvReportView to always stream results from the SQL server in 1000 row increments, so this shouldn't be a problem for general reporting. Expected large CSVs can just implement the max_download_size (which we can optionally add a default value, currently it's unbounded by default).
|
As discussed in the meeting earlier today - it might be nice to just dump everything present in the |
@ponyisi I updated the field list to include most fields on TransformRequest. I have still excluded some fields, such as database keys, the selection itself, and some of the longer fields that I wasn't sure would be useful. Can you take a look at that and tell me if you want it modified? |
Instead of limiting this report based on SQL rows as the Issue requested, I have added logic to
SqlCsvReportViewto allow a max size to be added to a report. Output will be truncated by row if the max download size is exceeded.