Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
Using perf:
$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg
NOTE: See @GabrielMajeri's comments below about the
-g
option.
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
import Control.Monad.Reader | |
import Control.Monad.State | |
import Control.Monad.Writer | |
-- our monad transformer stack | |
-- a reader with an prefix string for the log | |
-- a state with the current value as integer | |
-- a writer to log the work done |