<commit_before>package ctl

import (
	"context"
	"fmt"
	"io"
	"strings"

	"github.com/pilosa/pilosa"
)

// ConfigCommand represents a command for printing a default config.
type ConfigCommand struct {
	*pilosa.CmdIO
}

// NewConfigCommand returns a new instance of ConfigCommand.
func NewConfigCommand(stdin io.Reader, stdout, stderr io.Writer) *ConfigCommand {
	return &ConfigCommand{
		CmdIO: pilosa.NewCmdIO(stdin, stdout, stderr),
	}
}

// Run prints out the default config.
func (cmd *ConfigCommand) Run(ctx context.Context) error {
	fmt.Fprintln(cmd.Stdout, strings.TrimSpace(`
data-dir = "~/.pilosa"
bind = "localhost:10101"

[cluster]
  poll-interval = "2m0s"
  replicas = 1
  hosts = [
    "localhost:10101",
  ]

[anti-entropy]
  interval = "10m0s"

[metrics]
	service = "statsd"
	host = "127.0.0.1:8125"

[profile]
  cpu = ""
  cpu-time = "30s"

[plugins]
  path = ""
`)+"\n")
	return nil
}<commit_msg>example metric config is singular<commit_after>package ctl

import (
	"context"
	"fmt"
	"io"
	"strings"

	"github.com/pilosa/pilosa"
)

// ConfigCommand represents a command for printing a default config.
type ConfigCommand struct {
	*pilosa.CmdIO
}

// NewConfigCommand returns a new instance of ConfigCommand.
func NewConfigCommand(stdin io.Reader, stdout, stderr io.Writer) *ConfigCommand {
	return &ConfigCommand{
		CmdIO: pilosa.NewCmdIO(stdin, stdout, stderr),
	}
}

// Run prints out the default config.
func (cmd *ConfigCommand) Run(ctx context.Context) error {
	fmt.Fprintln(cmd.Stdout, strings.TrimSpace(`
data-dir = "~/.pilosa"
bind = "localhost:10101"

[cluster]
  poll-interval = "2m0s"
  replicas = 1
  hosts = [
    "localhost:10101",
  ]

[anti-entropy]
  interval = "10m0s"

[metric]
	service = "statsd"
	host = "127.0.0.1:8125"

[profile]
  cpu = ""
  cpu-time = "30s"

[plugins]
  path = ""
`)+"\n")
	return nil
}
{'fraction_non_alphanumeric': 0.13983739837398373, 'fraction_numerical': 0.03035230352303523, 'mean_word_length': 3.975741239892183, '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': '6147892', 'n_tokens_mistral': 735, 'n_tokens_neox': 701, 'n_words': 170}