<commit_before>// +build ignore

package main

import (
	"."
	"github.com/timeredbull/tsuru/db"
	"time"
)

func main() {
	var collector collector.Collector
	var err error

	db.Session, err = db.Open("127.0.0.1:27017", "tsuru")
	if err != nil {
		panic(err)
	}
	defer db.Session.Close()

	c := time.Tick(1 * time.Minute)
	for _ = range c {
		data, _ := collector.Collect()
		output := collector.Parse(data)
		collector.Update(output)
	}
}<commit_msg>using log instead panic on collection main<commit_after>// +build ignore

package main

import (
	"."
	"github.com/timeredbull/tsuru/db"
	"github.com/timeredbull/tsuru/log"
	"time"
)

func main() {
	var collector collector.Collector
	var err error

	db.Session, err = db.Open("127.0.0.1:27017", "tsuru")
	if err != nil {
		log.Panic(err.Error())
	}
	defer db.Session.Close()

	c := time.Tick(1 * time.Minute)
	for _ = range c {
		data, _ := collector.Collect()
		output := collector.Parse(data)
		collector.Update(output)
	}
}
{'fraction_non_alphanumeric': 0.16, 'fraction_numerical': 0.024615384615384615, 'mean_word_length': 3.5821596244131455, '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': '4777629', 'n_tokens_mistral': 411, 'n_tokens_neox': 374, 'n_words': 81}