-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (39 loc) · 1.15 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
VERSION != cat setup.py | grep version= | egrep -o "([0-9]{1,}\.)+[0-9]{1,}"
.PHONY: clean
clean:
rm -fr build/
rm -rf dist/
.PHONY: print-version
print-version:
echo $(VERSION)
.PHONY: venv/activate
venv/activate:
./venv/bin/activate
.PHONY: format
format:
black memory_consumer tests
.PHONY: lint
lint: format
flake8 memory_consumer tests
pylint memory_consumer tests
.PHONY: test-coverage
test-coverage:
pytest -s --cov=memory_consumer tests/test_mem_pattern.py tests/test_mem_consumer_alloc.py tests/test_mem_consumer.py
.PHONY: test
test:
pytest -s tests/test_mem_pattern.py
pytest -s tests/test_mem_consumer_alloc.py
pytest -s tests/test_mem_consumer.py
.PHONY: run-help
run-help:
python memory_consumer/start_mem_consumer.py -h
.PHONY: run
run: # run the application for 1 minute (-d 60)
python memory_consumer/start_mem_consumer.py -f patterns/s/high_low_10s.csv -n 10 -m 2000 -t 3 -s 0.1 -b -d 60
.PHONY: docker-build
docker-build:
docker build -t memory_consumer:$(VERSION) .
docker image prune -f
.PHONY: docker-run
docker-run:
docker run -it --rm memory_consumer:$(VERSION) -f patterns/s/high_low_10s.csv -n 10 -m 2000 -t 3 -s 0.1 -b -d 60