This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install graphite dependencies | |
apt-get install -y python3 python3-pip python3-cairo python3-django | |
apt-get install -y apache2 libapache2-mod-wsgi-py3 | |
# Install graphite | |
pip3 install https://github.com/graphite-project/whisper/tarball/master | |
pip3 install https://github.com/graphite-project/carbon/tarball/master | |
pip3 install https://github.com/graphite-project/graphite-web/tarball/master | |
# Setup a vhost by grabbing the example the graphite team released on their repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def timeit (warmups: Int, trials: Int) (block: => Unit): Unit = { | |
import Math.{min,max} | |
for (i <- 1 to warmups) block | |
var total = 0.0 | |
var best = Long.MaxValue | |
var worst = Long.MinValue | |
for (i <- 1 to trials) { | |
val beg = System.nanoTime() |