Permalink
Browse files

propagating transaction id

  • Loading branch information...
1 parent 903dd76 commit 275d75a236d388cbd667cf63fb5f25656ed18c8b Nick Kallen committed Apr 17, 2009
Showing with 8,644 additions and 7 deletions.
  1. +6 −2 joke_server.rb
  2. +6,890 −0 log/joke_server.rb.log
  3. +1,735 −0 log/proxy.rb.log
  4. +6 −3 proxy.rb
  5. +5 −1 statosaurus.rb
  6. +2 −1 util/line_protocol.rb
View
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
['rubygems', 'eventmachine', 'activesupport', 'statosaurus', 'optparse'].each { |dependency| require dependency }
+['util/line_protocol'].each { |dependency| require dependency }
begin
$options = {
@@ -13,12 +14,15 @@
begin
logfile = File.join(File.dirname(__FILE__), 'log', File.basename(__FILE__) + '.log')
- $stats = Statosaurus.new(['job_user', 'job_sys', 'job_real'], Logger.new(logfile))
+ $stats = Statosaurus.new(['job_user', 'job_sys', 'job_real', 'source_transaction_id'], Logger.new(logfile))
end
module JokeServer
- def receive_data(data)
+ include LineProtocol
+
+ def call(data)
$stats.transaction do
+ $stats.set('source_transaction_id', data)
$stats.measure('job') do
10000.times {}
sleep rand
Oops, something went wrong.

0 comments on commit 275d75a

Please sign in to comment.