<commit_before>#!/bin/bash
#usage: ./tools/size.sh

SRC=$1-debug.js
MIN=$1.js

SIZE_SRC=$(cat dist/$SRC | wc -c)
SIZE_MIN=$(cat dist/$MIN | wc -c)
SIZE_GZIP=$(gzip -c1 dist/$MIN | wc -c)

echo
echo "\t`echo "scale=3;$SIZE_SRC/1024" | bc -l` KB $SRC"
echo "\t`echo "scale=3;$SIZE_MIN/1024" | bc -l` KB $MIN"
echo "\t`echo "scale=3;$SIZE_GZIP/1024" | bc -l` KB $MIN gzipped"
echo "\t`cat dist/$1-debug.js | wc -l` LOC"
echo
<commit_msg>Add -e option to escape \t<commit_after>#!/bin/bash
#usage: ./tools/size.sh

SRC=$1-debug.js
MIN=$1.js

SIZE_SRC=$(cat dist/$SRC | wc -c)
SIZE_MIN=$(cat dist/$MIN | wc -c)
SIZE_GZIP=$(gzip -c1 dist/$MIN | wc -c)

echo
echo -e "\t`echo "scale=3;$SIZE_SRC/1024" | bc -l` KB $SRC"
echo -e "\t`echo "scale=3;$SIZE_MIN/1024" | bc -l` KB $MIN"
echo -e "\t`echo "scale=3;$SIZE_GZIP/1024" | bc -l` KB $MIN gzipped"
echo -e "\t`cat dist/$1-debug.js | wc -l` LOC"
echo

{'fraction_non_alphanumeric': 0.22620380739081747, 'fraction_numerical': 0.0425531914893617, 'mean_word_length': 3.65625, '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': '293186', 'n_tokens_mistral': 452, 'n_tokens_neox': 421, 'n_words': 105}