# This Makefile provides a way to really simple way to run benchmarks in a# docker environment.IMAGE= jbenet/go-ipfs-benchCONTAINER= go-ipfs-benchPACKAGE= epictestPACKAGE_DIR= epictestBUILD_DIR= ./build/benchCONTAINER_WORKING_DIR= /goCPU_PROF_NAME= cpu.outall:collectcollect:clean build_image run_profiler cp_pprof_from_containercp_pprof_from_container: docker cp$(CONTAINER):$(CONTAINER_WORKING_DIR)/$(CPU_PROF_NAME)$(BUILD_DIR) docker cp$(CONTAINER):$(CONTAINER_WORKING_DIR)/$(PACKAGE).test $(BUILD_DIR)build_image:cd .. && docker build -t$(IMAGE) .run_profiler: docker run --name$(CONTAINER)-it--entrypoint go $(IMAGE)test ./src/github.com/jbenet/go-ipfs/$(PACKAGE_DIR)--cpuprofile=$(CPU_PROF_NAME)clean: docker rm$(CONTAINER)||truerm-rf$(BUILD_DIR)analyze: go tool pprof $(BUILD_DIR)/$(PACKAGE).test $(BUILD_DIR)/$(CPU_PROF_NAME)