<commit_before>package main

import (
	"fmt"
	"time"

	"bitbucket.org/jonathanoliver/go-disruptor"
)

func publish(sequencer *disruptor.SingleProducerSequencer) {
	started := time.Now()
	for i := int64(0); i < MaxIterations; i++ {
		sequencer.Next(1)
		ringBuffer[i&RingMask] = i
		sequencer.Publish(i)
		if i%Mod == 0 && i > 0 {
			finished := time.Now()
			elapsed := finished.Sub(started)
			fmt.Println(i, elapsed)
			started = time.Now()
		}
	}
}

const MaxIterations = disruptor.MaxSequenceValue
const Mod = 1000000 * 100 // 1 million * N<commit_msg>589ms per 100 million (renamed i to sequence)<commit_after>package main

import (
	"fmt"
	"time"

	"bitbucket.org/jonathanoliver/go-disruptor"
)

func publish(sequencer *disruptor.SingleProducerSequencer) {
	started := time.Now()
	for sequence := int64(0); sequence < MaxIterations; sequence++ {
		sequencer.Next(1)
		ringBuffer[sequence&RingMask] = sequence
		sequencer.Publish(sequence)
		if sequence%Mod == 0 && sequence > 0 {
			finished := time.Now()
			elapsed := finished.Sub(started)
			fmt.Println(sequence, elapsed)
			started = time.Now()
		}
	}
}

const MaxIterations = disruptor.MaxSequenceValue
const Mod = 1000000 * 100 // 1 million * N
{'fraction_non_alphanumeric': 0.13421706710853357, 'fraction_numerical': 0.033140016570008285, 'mean_word_length': 4.162393162393163, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3701022', 'n_tokens_mistral': 495, 'n_tokens_neox': 422, 'n_words': 94}