<commit_before>package main

import "fmt"

type Pool []*Worker

func (p Pool) Len() int {
	return len(p)
}

func (p Pool) Less(i, j int) bool {
	return p[i].pending < p[j].pending
}

func (p Pool) Swap(i, j int) {
	p[i], p[j] = p[j], p[i]
}

func (p *Pool) Push(x interface{}) {
	*p = append(*p, x.(*Worker))
}

func (p *Pool) Pop() interface{} {
	prev := *p
	last := len(prev) - 1
	elem := prev[last]
	*p = prev[:last]
	return elem
}

func (p Pool) String() string {
	// TODO: Add str devation
	var workers string
	sum := 0
	for _, worker := range p {
		sum += worker.pending
		workers += string(worker.pending) + " "
	}
	avg := sum / len(p)
	return fmt.Sprintf("Workers: %v, Avg Load: %v", workers, avg)
}<commit_msg>Fixed string method to have proper int to string conversion;<commit_after>package main

import (
	"fmt"
	"strconv"
)

type Pool []*Worker

func (p Pool) Len() int {
	return len(p)
}

func (p Pool) Less(i, j int) bool {
	return p[i].pending < p[j].pending
}

func (p Pool) Swap(i, j int) {
	p[i], p[j] = p[j], p[i]
}

func (p *Pool) Push(x interface{}) {
	*p = append(*p, x.(*Worker))
}

func (p *Pool) Pop() interface{} {
	prev := *p
	last := len(prev) - 1
	elem := prev[last]
	*p = prev[:last]
	return elem
}

func (p Pool) String() string {
	// TODO: Add str devation
	var (
		workers string
		sum     int
		avg     float32
	)
	for _, worker := range p {
		sum += worker.pending
		workers += strconv.Itoa(worker.pending) + " "
	}
	avg = float32(sum / len(p))
	return fmt.Sprintf("Workers: %v, Avg Load: %v", workers, avg)
}
{'fraction_non_alphanumeric': 0.18199481865284975, 'fraction_numerical': 0.0045336787564766836, 'mean_word_length': 3.352112676056338, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1702047', 'n_tokens_mistral': 642, 'n_tokens_neox': 625, 'n_words': 194}