<commit_before>package commands

import (
	"flag"
	"time"

	"github.com/ostrost/ostent/ostent"
	"github.com/ostrost/ostent/types"
	"github.com/rcrowley/go-metrics/influxdb"
)

type influx struct {
	logger      *Logger
	RefreshFlag types.PeriodValue
	ServerAddr  types.BindValue
	Database    string
	Username    string
	Password    string
}

func influxdbCommandLine(cli *flag.FlagSet) CommandLineHandler {
	ix := &influx{
		logger:      NewLogger("[ostent sendto-influxdb] "),
		RefreshFlag: types.PeriodValue{Duration: types.Duration(10 * time.Second)}, // 10s default
		ServerAddr:  types.NewBindValue(8086),
	}<commit_msg>switch to go-metrics fork for influxdb support<commit_after>package commands

import (
	"flag"
	"time"

	"github.com/ostrost/ostent/ostent"
	"github.com/ostrost/ostent/types"
	"github.com/rzab/go-metrics/influxdb"
)

type influx struct {
	logger      *Logger
	RefreshFlag types.PeriodValue
	ServerAddr  types.BindValue
	Database    string
	Username    string
	Password    string
}

func influxdbCommandLine(cli *flag.FlagSet) CommandLineHandler {
	ix := &influx{
		logger:      NewLogger("[ostent sendto-influxdb] "),
		RefreshFlag: types.PeriodValue{Duration: types.Duration(10 * time.Second)}, // 10s default
		ServerAddr:  types.NewBindValue(8086),
	}
{'fraction_non_alphanumeric': 0.11024237685691947, 'fraction_numerical': 0.012509773260359656, 'mean_word_length': 4.333333333333333, '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': '6677225', 'n_tokens_mistral': 456, 'n_tokens_neox': 433, 'n_words': 86}