Copyright (C) 2019-2022 The Open Library Foundation. This software is distributed under the terms of the Apache License, Version 2.0. See the file LICENSE for more information.
Giraffe is a tool for creating visualizations of Okapi logs such as call graphs.
- Linux, macOS, possibly Windows
- Go 1.18 or later
- Graphviz
Giraffe has not been tested in Windows, but it may work normally or using the "Two Step" method below.
First set the GOPATH
environment variable to specify a path that can
serve as the build workspace for Go, e.g.:
export GOPATH=$HOME/go
Then:
go build ./cmd/giraffe
This builds the giraffe
executable in the current directory.
To generate a call graph in PDF format from part of an Okapi log stored
in sample.log
:
giraffe call -i sample.log -o sample.pdf
Other output formats, PNG, JPEG and DOT, are supported via the -T
flag, for example:
giraffe call -i sample.log -o sample.png -T png
Giraffe can highlight response times that meet a specified threshold, given in milliseconds. For example, to highlight response times of at least 250 ms:
giraffe call -i sample.log -o sample.pdf -rstime 250
For more information about command line flags:
giraffe help
If the instructions above do not work, for instance in Windows, try running Giraffe in two steps using dot:
giraffe call -i sample.log -o sample.dot -T dot
dot -o sample.pdf -T pdf sample.dot