-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
27 lines (23 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
MEASUREMENT_MODE ?= total
IMAGE_VERSION ?= latest
EVM ?= geth
# measurement params
VOLUME_DIR ?= /home/ubuntu/pdobacz/local
PROGRAMS ?=
SAMPLESIZE ?= 1
NSAMPLES ?= 1
MEASUREMENT_SUFFIX ?=
build:
docker build -f Dockerfile.${EVM} \
--tag "gas-cost-estimator/${EVM}_${MEASUREMENT_MODE}:${IMAGE_VERSION}" \
--build-arg MEASUREMENT_MODE=${MEASUREMENT_MODE} \
.
measure:
docker run --rm \
--privileged \
--security-opt seccomp:unconfined \
-v ${VOLUME_DIR}:/srv/local \
-it gas-cost-estimator/${EVM}_${MEASUREMENT_MODE}:${IMAGE_VERSION} \
sh -c "cd src && cat /srv/local/${PROGRAMS}.csv | python3 instrumentation_measurement/measurements.py measure --evm ${EVM} --mode ${MEASUREMENT_MODE} --sampleSize=${SAMPLESIZE} --nSamples=${NSAMPLES} > /srv/local/${EVM}_${PROGRAMS}_${SAMPLESIZE}_${NSAMPLES}${MEASUREMENT_SUFFIX}.csv"
trace:
cd src; cat ${VOLUME_DIR}/${PROGRAMS}.csv | python3 instrumentation_measurement/measurements.py measure --evm geth --mode trace --sampleSize 1 > ${VOLUME_DIR}/trace_${PROGRAMS}.csv; cd ..