Commit d88102fe authored by Mark Pundsack's avatar Mark Pundsack

Merge branch 'improve-metrics' into 'master'

Improve metrics output for Auto Monitoring

See merge request !2
parents f5690e06 130d8e0c
Pipeline #1 failed with stages
in 4 minutes and 49 seconds
require 'webrick'
require 'securerandom'
server = WEBrick::HTTPServer.new :Port => 5000
#The following proc is used to customize the server operations
#Return a successful Hello World response.
server.mount_proc '/' do |request, response|
response.body = 'Hello, world!'
sleep 0.125 + SecureRandom.random_number*0.250
end
#Return an error to help demonstrate monitoring capabilities
server.mount_proc '/error' do |request, response|
response.status = 500
response.body = 'Sorry we encountered an error.'
sleep 1.0+SecureRandom.random_number
end
server.start
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment