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
#!/usr/bin/env bash | |
set -e | |
# INSTRUCTIONS: | |
# Run benchmark tests first (test_bench.sh) to generate a cpu profile. | |
# First parameter of this script is the index to use (samples or cpu). | |
# USEFUL PPROF COMMANDS: | |
# top - Outputs the top entries (can also do top10 or top20 or topN where N is any number to limit results). | |
# list - Shows method code with flat and cum values. |
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
#!/usr/bin/env bash | |
set -e | |
# INSTRUCTIONS: | |
# Run benchmark tests first (test_bench.sh) to generate a memory profile. | |
# First parameter of this script is the index to use (alloc_space, alloc_objects, inuse_space, or inuse_objects). | |
# Alloc indexes track total allocations over time. Inuse tracks current in-memory usage. | |
# USEFUL PPROF COMMANDS: | |
# top - Outputs the top entries (can also do top10 or top20 or topN where N is any number to limit results). |
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
#!/bin/bash | |
set -e | |
if [ -z "$BENCH_TIME" ] | |
then | |
export BENCH_TIME=10s | |
fi | |
if [ -z "$BENCH" ] | |
then |
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
EXECUTABLE=executable-name | |
WINDOWS=$(EXECUTABLE)_windows_amd64.exe | |
LINUX=$(EXECUTABLE)_linux_amd64 | |
DARWIN=$(EXECUTABLE)_darwin_amd64 | |
VERSION=$(shell git describe --tags --always --long --dirty) | |
.PHONY: all test clean | |
all: test build ## Build and run tests |