<commit_before>package main

import (
    cache "code.google.com/p/vitess/go/cache"
	"fmt"
	zmq "github.com/alecthomas/gozmq"
	"hash"
	"hash/fnv"
	"os"
	"time"
	"unsafe"
)

type CacheValue struct {
	expires time.Time
}

const cache_value_size = uint64(unsafe.Sizeof(CacheValue{}))

func (self *CacheValue) Size() int {
	return int(cache_value_size)
}

func main() {
	cache := cache.NewLRUCache(cache_value_size * 100000)

	context, _ := zmq.NewContext()

	receiver, _ := context.NewSocket(zmq.SUB)
	receiver.SetSockOptString(zmq.SUBSCRIBE, "")
	receiver.Connect("tcp://master.eve-emdr.com:8050")
	receiver.Connect("tcp://secondary.eve-emdr.com:8050")
	//receiver.Connect("tcp://relay-us-central-1.eve-emdr.com:8050")

	sender, _ := context.NewSocket(zmq.PUB)
	sender.Bind("tcp://0.0.0.0:8050")

	cache_duration, err := time.ParseDuration("5m")
    if err != nil {
        println(err.Error())
        os.Exit(1)
    }

	println("Listening on port 8050...")

	for {
		msg, zmq_err := receiver.Recv(0)
		now := time.Now()<commit_msg>Updating LRU cache max size to 1k entries.<commit_after>package main

import (
    cache "code.google.com/p/vitess/go/cache"
	"fmt"
	zmq "github.com/alecthomas/gozmq"
	"hash"
	"hash/fnv"
	"os"
	"time"
	"unsafe"
)

type CacheValue struct {
	expires time.Time
}

const cache_value_size = uint64(unsafe.Sizeof(CacheValue{}))

func (self *CacheValue) Size() int {
	return int(cache_value_size)
}

func main() {
	cache := cache.NewLRUCache(cache_value_size * 1000)

	context, _ := zmq.NewContext()

	receiver, _ := context.NewSocket(zmq.SUB)
	receiver.SetSockOptString(zmq.SUBSCRIBE, "")
	receiver.Connect("tcp://master.eve-emdr.com:8050")
	receiver.Connect("tcp://secondary.eve-emdr.com:8050")
	//receiver.Connect("tcp://relay-us-central-1.eve-emdr.com:8050")

	sender, _ := context.NewSocket(zmq.PUB)
	sender.Bind("tcp://0.0.0.0:8050")

	cache_duration, err := time.ParseDuration("5m")
    if err != nil {
        println(err.Error())
        os.Exit(1)
    }

	println("Listening on port 8050...")

	for {
		msg, zmq_err := receiver.Recv(0)
		now := time.Now()
{'fraction_non_alphanumeric': 0.17185256103398755, 'fraction_numerical': 0.03398755385351843, 'mean_word_length': 3.96437054631829, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4845237', 'n_tokens_mistral': 901, 'n_tokens_neox': 834, 'n_words': 130}