Skip to content

Instantly share code, notes, and snippets.

@bayashi
Created August 21, 2015 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bayashi/5dbee33e65d5c7e58fa6 to your computer and use it in GitHub Desktop.
Save bayashi/5dbee33e65d5c7e58fa6 to your computer and use it in GitHub Desktop.
YAPC::Asia 2015 Busy Rate
$ perl -MLWP::Simple=get -we 'my %r=(a=>1000, b=>100, c=>120, d=>288, e=>288); for my $room (sort keys %r){ my ($count) = (get("http://api.conbu.net/v1/associations/track_$room") =~ m!:(\d+)!); printf("track".uc($room).": %.2f%%\t%04d/%04d\n", $count/$r{$room}*100, $count, $r{$room}); }'
trackA: 44.60% 0446/1000
trackB: 136.00% 0136/0100
trackC: 66.67% 0080/0120
trackD: 75.35% 0217/0288
trackE: 68.40% 0197/0288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment