Skip to content

Instantly share code, notes, and snippets.

View drhodes's full-sized avatar

Derek Rhodes drhodes

View GitHub Profile
@xfire
xfire / MonadTransV2.hs
Created July 13, 2011 18:15
monad transformer stack example, newtype version
{-# 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
@KodrAus
KodrAus / Profile Rust on Linux.md
Last active November 14, 2023 17:19
Profiling Rust Applications

Profiling performance

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.