<commit_before>SHELL:=/bin/bash
TIMEOUT=60.0
RUNNERS=$(shell type -P ../elpi $(wildcard ../elpi.*)) $(shell if type tjsim >/dev/null 2>&1; then type -P tjsim; else echo; fi)
TIME=$(shell if type -P gtime >/dev/null 2>&1; then type -P gtime; else echo /usr/bin/time; fi)
BUILD=_build/default/
STACK=32768

help:
	@echo 'Known targets:'
	@echo
	@echo '  build          build the test utility'
	@echo '  man            manpage of the test utility'
	@echo
	@echo '  run            runs the entire test suite'
	@echo '  run ONLY=rex   runs only tests matching rex'
	@echo
	@echo '  clean          purges _build _log and plots'
	@echo
	@echo 'Known runners:'
	@echo
	@echo '  ' $(RUNNERS)


build: .merlin
	@dune build ./test.exe

man: build
	@$(BUILD)test.exe --help

run: build
	ulimit -s $(STACK); $(BUILD)test.exe \
		--seed $$RANDOM \
		--timeout $(TIMEOUT) \
		--time=$(TIME) \
		$(addprefix --name-match ,$(ONLY)) \
		$(addprefix --runner , $(RUNNERS))

.merlin: dune
	@dune build .merlin

clean:
	rm -rf _log _build data.csv data.csv.dat data.csv.svg data.csv.plot 
<commit_msg>[test] make it possible to disable timing by passing TIME=<commit_after>SHELL:=/bin/bash
TIMEOUT=60.0
RUNNERS=$(shell type -P ../elpi $(wildcard ../elpi.*)) $(shell if type tjsim >/dev/null 2>&1; then type -P tjsim; else echo; fi)
TIME=--time $(shell if type -P gtime >/dev/null 2>&1; then type -P gtime; else echo /usr/bin/time; fi)
BUILD=_build/default/
STACK=32768

help:
	@echo 'Known targets:'
	@echo
	@echo '  build          build the test utility'
	@echo '  man            manpage of the test utility'
	@echo
	@echo '  run            runs the entire test suite'
	@echo '  run ONLY=rex   runs only tests matching rex'
	@echo
	@echo '  clean          purges _build _log and plots'
	@echo
	@echo 'Known runners:'
	@echo
	@echo '  ' $(RUNNERS)


build: .merlin
	@dune build ./test.exe

man: build
	@$(BUILD)test.exe --help

run: build
	ulimit -s $(STACK); $(BUILD)test.exe \
		--seed $$RANDOM \
		--timeout $(TIMEOUT) \
		$(TIME) \
		$(addprefix --name-match ,$(ONLY)) \
		$(addprefix --runner , $(RUNNERS))

.merlin: dune
	@dune build .merlin

clean:
	rm -rf _log _build data.csv data.csv.dat data.csv.svg data.csv.plot 

{'fraction_non_alphanumeric': 0.15510204081632653, 'fraction_numerical': 0.010884353741496598, 'mean_word_length': 2.836521739130435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5542837', 'n_tokens_mistral': 878, 'n_tokens_neox': 835, 'n_words': 264}