<commit_before>package processor

import (
	"runtime"
	"time"

	"golang.org/x/time/rate"
)

type Options struct {
	Handler         interface{}
	FallbackHandler interface{}

	WorkerNumber int
	BufferSize   int
	Retries      int
	Backoff      time.Duration

	RateLimit rate.Limit
	Limiter   Limiter
}

func (opt *Options) init() {
	if opt.WorkerNumber == 0 {
		opt.WorkerNumber = runtime.NumCPU() * 10
	}
	if opt.BufferSize == 0 {
		opt.BufferSize = opt.WorkerNumber
	}
	if opt.RateLimit == 0 {
		opt.RateLimit = rate.Inf
	}
	if opt.Retries == 0 {
		opt.Retries = 10
	}
	if opt.Backoff == 0 {
		opt.Backoff = 3 * time.Second
	}
}<commit_msg>processor: default buffer size is 10.<commit_after>package processor

import (
	"runtime"
	"time"

	"golang.org/x/time/rate"
)

type Options struct {
	Handler         interface{}
	FallbackHandler interface{}

	WorkerNumber int
	BufferSize   int
	Retries      int
	Backoff      time.Duration

	RateLimit rate.Limit
	Limiter   Limiter
}

func (opt *Options) init() {
	if opt.WorkerNumber == 0 {
		opt.WorkerNumber = runtime.NumCPU() * 10
	}
	if opt.BufferSize == 0 {
		opt.BufferSize = 10
	}
	if opt.RateLimit == 0 {
		opt.RateLimit = rate.Inf
	}
	if opt.Retries == 0 {
		opt.Retries = 10
	}
	if opt.Backoff == 0 {
		opt.Backoff = 3 * time.Second
	}
}
{'fraction_non_alphanumeric': 0.11413043478260869, 'fraction_numerical': 0.018633540372670808, 'mean_word_length': 2.9060606060606062, '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': '5590361', 'n_tokens_mistral': 512, 'n_tokens_neox': 466, 'n_words': 117}