<commit_before>#!/bin/bash
set -e
set -o pipefail

REV="$(git rev-parse --short HEAD)"
VERSION="$1"
if [ -z "$1" ]
  then
    VERSION=0.0.0
fi

echo "revision: " $REV "version: " ${VERSION}

echo "testing project - chapter5"

go test ./chapter5 -bench=.

echo "golang build"

go build -ldflags "-X main.Build=${VERSION} -X main.Revision=${REV}" -v -o tutorial .

echo "DONE"

exit 0
<commit_msg>added memory profiling to the tests<commit_after>#!/bin/bash
set -e
set -o pipefail

REV="$(git rev-parse --short HEAD)"
VERSION="$1"
if [ -z "$1" ]
  then
    VERSION=0.0.0
fi

echo "revision: " $REV "version: " ${VERSION}

echo "testing project - chapter5"

go test ./chapter5 -bench=. -benchmem

echo "golang build"

go build -ldflags "-X main.Build=${VERSION} -X main.Revision=${REV}" -v -o tutorial .

echo "DONE"

exit 0

{'fraction_non_alphanumeric': 0.17396593673965938, 'fraction_numerical': 0.019464720194647202, 'mean_word_length': 3.377659574468085, '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': '5403760', 'n_tokens_mistral': 334, 'n_tokens_neox': 310, 'n_words': 100}