aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 23 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 16311a1..1a13c56 100644
--- a/Makefile
+++ b/Makefile
@@ -2,20 +2,37 @@
# Makefile for csv-hasher
#
+CHUNKSIZE = 10000
+CHECK_LINES = 20
+SAMPLE_ITERATIONS = 1000
+SAMPLE_ROWS_PER_ITERATION = 1000
+TESTS = tests
+COLNAME = id
+SAMPLE = $(TESTS)/sample.csv
+OUTPUT = $(TESTS)/output.csv
+
vendor:
pipenv install
sample:
- bin/make-sample 200
+ @#bin/make-sample $(ITERATIONS)
+ pipenv run ./csv-sampler.py --iterations $(SAMPLE_ITERATIONS) --rows_per_iteration $(SAMPLE_ROWS_PER_ITERATION) $(SAMPLE)
test-sample:
- pipenv run ./csv-hasher.py --chunksize 5 tests/sample.csv tests/output.csv id
+ pipenv run ./csv-hasher.py --chunksize $(CHUNKSIZE) $(SAMPLE) $(OUTPUT) $(COLNAME)
show-test-output:
- head -20 tests/sample.csv
- head -20 tests/output.csv
+ head -$(CHECK_LINES) $(SAMPLE)
+ head -$(CHECK_LINES) $(OUTPUT)
+ tail -$(CHECK_LINES) $(SAMPLE)
+ tail -$(CHECK_LINES) $(OUTPUT)
+ wc -l $(SAMPLE)
+ wc -l $(OUTPUT)
+ ls -lh $(TESTS)
clean-sample:
- rm tests/*.csv
+ rm -f tests/*.csv
+
+clean: clean-sample
-test: clean-sample sample test-sample show-test-output clean-sample
+test: clean-sample sample test-sample show-test-output