Parent

Class Index [+]

Quicksearch

Amalgalite::Taps::IO

An IOTap is an easy way to send all top information to andy IO based object. Both profile and trace tap information can be captured This means you can send the events to STDOUT with:

  db.profile_tap = db.trace_tap  = Amalgalite::Taps::Stdout.new

Attributes

profile_tap[R]

(Not documented)

io[R]

(Not documented)

Public Class Methods

new( io ) click to toggle source

(Not documented)

# File lib/amalgalite/taps/io.rb, line 24
      def initialize( io )
        @io = io
        @profile_tap = ProfileTap.new( self, 'output_profile_event' )
      end

Public Instance Methods

dump_profile() click to toggle source

(Not documented)

# File lib/amalgalite/taps/io.rb, line 43
      def dump_profile
        samplers.each_pair do |k,v|
          io.puts v.to_s
        end
      end
output_profile_event( msg, time ) click to toggle source

(Not documented)

# File lib/amalgalite/taps/io.rb, line 39
      def output_profile_event( msg, time )
        io.puts "#{time} : #{msg}"
      end
profile( msg, time ) click to toggle source

need a profile method, it routes through the profile tap which calls back to output_profile_event

# File lib/amalgalite/taps/io.rb, line 35
      def profile( msg, time )
        @profile_tap.profile(msg, time)
      end
samplers() click to toggle source

(Not documented)

# File lib/amalgalite/taps/io.rb, line 49
      def samplers
        profile_tap.samplers
      end
trace( msg ) click to toggle source

(Not documented)

# File lib/amalgalite/taps/io.rb, line 29
      def trace( msg )
        io.puts msg 
      end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.