<commit_before>ifndef BENCHMARKS_ROOT
$(error BENCHMARKS_ROOT should be defined)
endif

sniper := ${BENCHMARKS_ROOT}/run-sniper

options := ${SNIPER_OPTIONS}
options += -i small

apps = blackscholes bodytrack facesim ferret freqmine raytrace swaptions fluidanimate vips x264
kernels = canneal dedup streamcluster
benchmarks := ${apps} ${kernels}

all: $(benchmarks)

$(benchmarks): %: %/.done

%/.done:
	@mkdir -p $*
	@echo "Running parsec-$* with '$(shell ./configure.py $*)'..."
	@(cd $* && BENCHMARK_NAME=$* ${sniper} ${options} $(shell ./configure.py $*) -p parsec-$*)
	@echo "Finished parsec-$*."
	@touch $@

%-clean:
	@rm -rf $*

%-kill:
	@killall -q -KILL -- $* || true

clean: $(addsuffix -clean,$(benchmarks))

kill: $(addsuffix -kill,$(benchmarks))

.PHONY: all $(benchmarks) %clean %kill
<commit_msg>Declare each PARSEC benchmark separately<commit_after>ifndef BENCHMARKS_ROOT
$(error BENCHMARKS_ROOT should be defined)
endif

sniper := ${BENCHMARKS_ROOT}/run-sniper

options := ${SNIPER_OPTIONS}
options += -i small

apps = blackscholes bodytrack facesim ferret freqmine raytrace swaptions fluidanimate vips x264
kernels = canneal dedup streamcluster
benchmarks := ${apps} ${kernels}

all: $(benchmarks)

define declare_benchmark
$(1)_options := $(shell ./configure.py $(1))

$(1): $(1)/.done

$(1)/.done:
	@mkdir -p $(1)
	@echo "Running parsec-$(1) with '$${$(1)_options}'..."
	@(cd $(1) && BENCHMARK_NAME=$(1) $${sniper} $${options} $${$(1)_options} -p parsec-$(1))
	@echo "Finished parsec-$(1)."
	@touch $$@
endef

$(foreach benchmark,$(benchmarks),$(eval $(call declare_benchmark,$(benchmark))))

%-clean:
	@rm -rf $*

%-kill:
	@killall -q -KILL -- $* || true

clean: $(addsuffix -clean,$(benchmarks))

kill: $(addsuffix -kill,$(benchmarks))

.PHONY: all $(benchmarks) %clean %kill

{'fraction_non_alphanumeric': 0.19299221357063404, 'fraction_numerical': 0.010567296996662959, 'mean_word_length': 5.016722408026756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2847801', 'n_tokens_mistral': 697, 'n_tokens_neox': 681, 'n_words': 169}