<commit_before><commit_msg>added benchmark for RecordGenerator.insertRR<commit_after>package records

import (
	"math/rand"
	"strconv"
	"testing"
)

// BenchmarkInsertRR *only* tests insertRR, not the taskRecord funcs.
func BenchmarkInsertRR(b *testing.B) {
	const (
		clusterSize = 1000
		appCount    = 5
	)
	var (
		slaves = make([]string, clusterSize)
		apps   = make([]string, appCount)
		rg     = &RecordGenerator{
			As:   rrs{},
			SRVs: rrs{},
		}
	)
	for i := 0; i < clusterSize; i++ {
		slaves[i] = "slave" + strconv.Itoa(i)
	}
	for i := 0; i < appCount; i++ {
		apps[i] = "app" + strconv.Itoa(i)
	}

	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		var (
			si = rand.Int31n(clusterSize)
			ai = rand.Int31n(appCount)
		)
		rg.insertRR(apps[ai], slaves[si], "A")
	}
}
{'fraction_non_alphanumeric': 0.16516129032258065, 'fraction_numerical': 0.015483870967741935, 'mean_word_length': 3.287292817679558, 'pattern_counts': {'":': 0, '<': 6, '<?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': '7462400', 'n_tokens_mistral': 353, 'n_tokens_neox': 318, 'n_words': 71}