Sha256: 12ce1656d153d8cffbcef746920ff7e934c3a81e6c661c7c807b76fa53164e5f

Contents?: true

Size: 820 Bytes

Versions: 45

Compression:

Stored size: 820 Bytes

Contents

require 'trisulrp'


# usage
raise "Usage: test_http_vol.rb TRP-SERVER TRP-PORT" unless ARGV.size==2

# open a connection to Trisul server from command line args
conn  = connect(ARGV[0],ARGV[1],"Demo_Client.crt","Demo_Client.key")
tmarr = get_available_time(conn)

# send request for http ( cg=APPS, key=p-0050) 
# notice use of volumes_only => 1 
req = TrisulRP::Protocol.mk_request(TRP::Message::Command::COUNTER_ITEM_REQUEST,
                                    :counter_group=> CG_APP,
                                    :key=> 'p-0050',
                                    :time_interval => mk_time_interval(tmarr),
									:volumes_only => 1 )

# print totals 
get_response(conn,req) do |resp|
	volume = resp.stats.meters.each do | meter|
	  	print "Meter #{meter.meter} = #{meter.values[0].val}  \n"
	end 
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
trisulrp-3.2.43 test/test_http_volume.rb
trisulrp-3.2.42 test/test_http_volume.rb
trisulrp-3.2.41 test/test_http_volume.rb
trisulrp-3.2.40 test/test_http_volume.rb
trisulrp-3.2.39 test/test_http_volume.rb
trisulrp-3.2.38 test/test_http_volume.rb
trisulrp-3.2.37 test/test_http_volume.rb
trisulrp-3.2.36 test/test_http_volume.rb
trisulrp-3.2.35 test/test_http_volume.rb
trisulrp-3.2.34 test/test_http_volume.rb
trisulrp-3.2.32 test/test_http_volume.rb
trisulrp-3.2.31 test/test_http_volume.rb
trisulrp-3.2.27 test/test_http_volume.rb
trisulrp-3.2.26 test/test_http_volume.rb
trisulrp-3.2.16 test/test_http_volume.rb
trisulrp-3.2.15 test/test_http_volume.rb
trisulrp-3.2.14 test/test_http_volume.rb
trisulrp-3.2.13 test/test_http_volume.rb
trisulrp-3.2.9 test/test_http_volume.rb
trisulrp-3.2.8 test/test_http_volume.rb