Story #2612

Workbench displays user usage in logs

Added by Misha Zatsman over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Misha Zatsman
Category:
-
Start date:
04/16/2014
Due date:
% Done:

40%

Estimated time:
(Total: 0.00 h)
Story points:
1.0

Description

Workbench will display the following for each user and group:
  • Total Read Size: The sum of the byte sizes of all collections they have permission to read (not counting replication).
  • Weighted Read Size: Same as above, but for each collection we divide by the number of readers. So that summing across users results in the total collection size (not counting replication).
  • Total Persist Size: The disk usage of all collections they have requested to persist. This is the sum of the collection size times the replication level the user requested for that collection.
  • Weighted Persist Size: Above size weighted by how much replication they requested, so that summing this across all users it sums to the total disk usage for those collections.

These will appear as four columns in a table at /users/storage. It will look similar to /user/activity.


Subtasks

Task #2670: Update workbench documentation as I use itResolvedMisha Zatsman

Task #2683: Review 2612-workbench-displays-user-storageResolvedTom Clegg

Task #2688: Fix indentation/whitespace discovered in activity.html.erbResolvedMisha Zatsman

Task #2669: Run development workbench on shell.arvadosResolvedMisha Zatsman

Task #2671: Modify workbench code to display user usageResolvedMisha Zatsman

Associated revisions

Revision 416374d4
Added by Misha Zatsman over 7 years ago

Merge branch '2612-workbench-displays-user-storage'
closes #2612

History

#1 Updated by Misha Zatsman over 7 years ago

  • Project changed from Arvados Private to Arvados

#2 Updated by Misha Zatsman over 7 years ago

  • Target version set to 2014-05-07 Storing and Organizing Data

#3 Updated by Misha Zatsman over 7 years ago

  • Story points set to 1.0

#4 Updated by Misha Zatsman over 7 years ago

  • Description updated (diff)

#5 Updated by Misha Zatsman over 7 years ago

  • Description updated (diff)

#6 Updated by Tom Clegg over 7 years ago

As of 7f7cd27d5fc31dc5bbec7f95905fd394a5b317c7, taking into account "work in progress" caveat
  • Only complaint I see is that .to_s is superfluous in @user_storage[user.uuid][key].to_s (<%= blah %> does that implicitly)
  • Route, view, controller stuff all looks right to me

#7 Updated by Misha Zatsman over 7 years ago

Tom Clegg wrote:

As of 7f7cd27d5fc31dc5bbec7f95905fd394a5b317c7, taking into account "work in progress" caveat

  • Only complaint I see is that .to_s is superfluous in @user_storage[user.uuid][key].to_s (<%= blah %> does that implicitly)

Ok great, I fixed that.

  • Route, view, controller stuff all looks right to me

Cool.

I made it prettier, and now it's ready for a real review.

I don't think my page is reachable from any existing pages. Where and how do I add a link to it?

#8 Updated by Tom Clegg over 7 years ago

Looks great. Only complaint I could find:

Some "tab in indent" complaints from git. https://arvados.org/projects/arvados/wiki/Coding_Standards has ways to make git report whitespace errors (git diff --check) and prevent you from committing them (although this means you have to use --no-verify to commit or merge Go code -- we figured Go's strong 8-char-tab convention trumps our preference for no tabs). And emacs/vim bits to tell them to auto-indent with spaces.

I don't think my page is reachable from any existing pages. Where and how do I add a link to it?

For the moment, closest we have to a good place to put it: apps/workbench/app/views/users/_show_activity.html.erb

#9 Updated by Misha Zatsman over 7 years ago

Tom Clegg wrote:

Looks great. Only complaint I could find:

Some "tab in indent" complaints from git. https://arvados.org/projects/arvados/wiki/Coding_Standards has ways to make git report whitespace errors (git diff --check) and prevent you from committing them (although this means you have to use --no-verify to commit or merge Go code -- we figured Go's strong 8-char-tab convention trumps our preference for no tabs). And emacs/vim bits to tell them to auto-indent with spaces.

Thanks. I have those bits in my .emacs but added the git config stuff. The tabs seem to have come from activity.html.erb from which I pasted in pieces.

I don't think my page is reachable from any existing pages. Where and how do I add a link to it?

For the moment, closest we have to a good place to put it: apps/workbench/app/views/users/_show_activity.html.erb

Cool, I added it in. I'm weirded out by ruby creating magic strings like storage_users_url and not defining them anywhere I can grep for them, but it seems to work.

#10 Updated by Anonymous over 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 25 to 100

Applied in changeset arvados|commit:416374d4bbf381f5689fe2d1c72705d0796e8382.

Also available in: Atom PDF