internal/requestlog: add end-to-end benchmarks

Results from my workstation:

BenchmarkE2E/Baseline-12  	   20000	     85744 ns/op	    5171 B/op	      68 allocs/op
BenchmarkE2E/WithLog-12   	   20000	     98693 ns/op	    6321 B/op	     102 allocs/op

We can expect ~10us CPU and ~1KB RAM of overhead per each request.
Likely fluentd will be the bottleneck at that point.

I dug in with the profiler and the overhead is almost entirely coming
from JSON encoding.  If performances becomes an issue, use of the
encoding/json package could be eschewed for a custom marshaler.

Change-Id: I757740b31d168ac339e4775bf24212ba12329ae9
Reviewed-by: Sarah Adams <>
1 file changed