Permalink
Browse files

add author to metric name

  • Loading branch information...
obfuscurity committed Jul 23, 2012
1 parent 2a9761c commit fe1f7d9e93ca2f9ad385d4ed1369eb1345bfb4a8
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/backstop/web.rb
View
@@ -65,9 +65,11 @@ def sockets
data["source"] = "github"
data["ref"].gsub!(/\//, ".")
data["commits"].each do |commit|
- s = sockets.sample
+ repo = data['repository']['name']
+ author = commit['author']['email'].gsub(/[\.@]/, "-")
measure_time = DateTime.parse(commit["timestamp"]).strftime("%s")
- s.puts "#{data['source']}.#{data['repository']['name']}.#{data['ref']}.#{commit['id']} 1 #{measure_time}"
+ s = sockets.sample
+ s.puts "#{data['source']}.#{repo}.#{data['ref']}.#{author}.#{commit['id']} 1 #{measure_time}"
end
"ok"
end

0 comments on commit fe1f7d9

Please sign in to comment.