Skip to content

Instantly share code, notes, and snippets.

@sshirokov
Created August 30, 2012 21:33
Show Gist options
  • Select an option

  • Save sshirokov/3541687 to your computer and use it in GitHub Desktop.

Select an option

Save sshirokov/3541687 to your computer and use it in GitHub Desktop.
compute_rate: ->
['messages', 'bytes'].forEach (total_type) =>
{
last: @counts[total_type].last,
rate: @counts[total_type].rate
} =
{
last: @counts[total_type].total,
rate: @counts[total_type].total - @counts[total_type].last
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment