Skip to content

Add spawn process times

Andrew Newdigate requested to merge process_timings into master

Log spawned process stats on process termination. Once these values are in ELK, they will be extremely useful in postmortems and for other usage stats.

Includes real, user and system time values for the spawned process.

time="2017-08-14T15:24:33+01:00" 
level=info 
msg="spawn complete" 
args=[/usr/local/bin/git upload-pack /Users/andrewn/code/go/src/gitlab.com/gitlab-org/gitaly/internal/testhelper/testdata/data/gitlab-test.git] 
command.exitCode=0 
command.system_time_ms=4.622 
command.total_time_ms=23.905362 
command.user_time_ms=11.408 
grpc.method=SSHUploadPack 
grpc.service=gitaly.SSHService 
path="/usr/local/bin/git" 
span.kind=server 
system=grpc 
test=TestUploadPackCloneSuccess

In future, we could also add getrusage easily, but this is the minimum viable change.

Merge request reports