Skip to content

Instantly share code, notes, and snippets.

@woto
Created February 20, 2020 22:49
Show Gist options
  • Save woto/2685cf78168774fd7c841cc8f841fd2a to your computer and use it in GitHub Desktop.
Save woto/2685cf78168774fd7c841cc8f841fd2a to your computer and use it in GitHub Desktop.
{
:duration => 0.21136004943400621,
:allocations => 5,
:cpu_time => 0.09248999999999889,
:idle_time => 0.11887004943400732,
:transaction_id => "054dc3152d419f050463",
:payload => {
:rack_env => {
"CONTENT_LENGTH" => "7",
"CONTENT_TYPE" => "application/protobuf",
"GATEWAY_INTERFACE" => "CGI/1.1",
"PATH_INFO" => "/Hello",
"QUERY_STRING" => "",
"REMOTE_ADDR" => "127.0.0.1",
"REMOTE_HOST" => "127.0.0.1",
"REQUEST_METHOD" => "POST",
"REQUEST_URI" => "http://localhost:8080/twirp/example.hello_world.HelloWorld/Hello",
"SCRIPT_NAME" => "/twirp/example.hello_world.HelloWorld",
"SERVER_NAME" => "localhost",
"SERVER_PORT" => "8080",
"SERVER_PROTOCOL" => "HTTP/1.1",
"SERVER_SOFTWARE" => "WEBrick/1.4.2 (Ruby/2.6.5/2019-10-01)",
"HTTP_USER_AGENT" => "Faraday v0.17.3",
"HTTP_ACCEPT_ENCODING" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
"HTTP_ACCEPT" => "*/*",
"HTTP_CONNECTION" => "close",
"HTTP_HOST" => "localhost:8080",
"rack.version" => [
[0] 1,
[1] 3
],
"rack.input" => #<StringIO:0x000055af958f7920>,
"rack.errors" => #<IO:<STDERR>>,
"rack.multithread" => true,
"rack.multiprocess" => false,
"rack.run_once" => false,
"rack.url_scheme" => "http",
"rack.hijack?" => true,
"rack.hijack" => #<Proc:0x000055af958f7718@/home/woto/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rack-2.0.8/lib/rack/handler/webrick.rb:74 (lambda)>,
"rack.hijack_io" => nil,
"HTTP_VERSION" => "HTTP/1.1",
"REQUEST_PATH" => "/twirp/example.hello_world.HelloWorld/Hello"
},
:env => {
:content_type => "application/protobuf",
:rpc_method => :Hello,
:input_class => Example::HelloWorld::HelloRequest < Object,
:output_class => Example::HelloWorld::HelloResponse < Object,
:ruby_method => :hello,
:input => <Example::HelloWorld::HelloRequest: name: "World">,
:http_response_headers => {},
:output => <Example::HelloWorld::HelloResponse: message: "Hello World">
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment