<commit_before># valgrind executed on remote linux machine

VFLAGS = --track-origins=yes --tool=memcheck --leak-check=yes --error-exitcode=1

rsync:
	ssh udesktop 'rm -rf tmp/ee'
	rsync -ra -e ssh --exclude '/.git' --exclude '/bin' --exclude '/deps' --exclude '/build' . udesktop:tmp/ee

grind: $(LIST) $(OBJS) $(TESTS)
	set -e; for file in bin/test/*; do echo "\n\033[00;32m+++ $$file +++\033[00m\n" && valgrind $(VFLAGS) ./$$file; done

rgrind: rsync
	ssh udesktop 'cd tmp/ee && make clean && make grind'

grind-report: $(LIST) $(OBJS) $(TESTS) 
	for file in $^; do \
		echo "\n \033[00;34m+++ $$file +++ \033[00m\n" && \
		G_SLICE=always-malloc G_DEBUG=gc-friendly \
		valgrind $(VFLAGS) -v --num-callers=40 --log-file=valgrind.log ./$$file; \
	done

rgrind-report: rsync
	ssh udesktop 'cd tmp/ee && make clean && make grind-report'
	scp udesktop:tmp/ee/valgrind.log .
	cat valgrind.log
<commit_msg>copying deps src for rgrind<commit_after># valgrind executed on remote linux machine

VFLAGS = --track-origins=yes --tool=memcheck --leak-check=yes --error-exitcode=1

rsync:
	ssh udesktop 'rm -rf tmp/ee'
	rsync -ra -e ssh --exclude '/.git' --exclude '/bin' --exclude '/deps/**/*.o' --exclude '/build' . udesktop:tmp/ee

grind: $(LIST) $(OBJS) $(TESTS)
	set -e; for file in bin/test/*; do echo "\n\033[00;32m+++ $$file +++\033[00m\n" && valgrind $(VFLAGS) ./$$file; done

rgrind: rsync
	ssh udesktop 'cd tmp/ee && make clean && make grind'

grind-report: $(LIST) $(OBJS) $(TESTS) 
	for file in $^; do \
		echo "\n \033[00;34m+++ $$file +++ \033[00m\n" && \
		G_SLICE=always-malloc G_DEBUG=gc-friendly \
		valgrind $(VFLAGS) -v --num-callers=40 --log-file=valgrind.log ./$$file; \
	done

rgrind-report: rsync
	ssh udesktop 'cd tmp/ee && make clean && make grind-report'
	scp udesktop:tmp/ee/valgrind.log .
	cat valgrind.log

{'fraction_non_alphanumeric': 0.19726027397260273, 'fraction_numerical': 0.02958904109589041, 'mean_word_length': 3.4320388349514563, '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': '3247638', 'n_tokens_mistral': 807, 'n_tokens_neox': 742, 'n_words': 196}