<commit_before>package main

import (
	"github.com/Symantec/health-agent/httpd"
	"github.com/Symantec/health-agent/probers/filesystems"
	"github.com/Symantec/health-agent/probers/loadavg"
	"github.com/Symantec/health-agent/probers/memory"
	"github.com/Symantec/health-agent/probers/netif"
	"github.com/Symantec/health-agent/probers/network"
	"github.com/Symantec/health-agent/probers/storage"
	"github.com/Symantec/health-agent/probers/systime"
	"github.com/Symantec/tricorder/go/tricorder"
	"io"
	"log"
)

type prober interface {
	Probe() error
}

type proberList []prober

func setupProbers() (proberList, error) {
	topMetricsDir, err := tricorder.RegisterDirectory("/sys")
	if err != nil {
		return nil, err
	}
	var probers proberList
	probers = append(probers, filesystems.Register(mkdir(topMetricsDir, "fs")))
	probers = append(probers, loadavg.Register(mkdir(topMetricsDir, "loadavg")))
	probers = append(probers, memory.Register(mkdir(topMetricsDir, "memory")))
	probers = append(probers, netif.Register(mkdir(topMetricsDir, "netif")))
	probers = append(probers, network.Register(mkdir(topMetricsDir, "network")))
	probers = append(probers, storage.Register(mkdir(topMetricsDir, "storage")))
	probers = append(probers, systime.Register(mkdir(topMetricsDir, "")))
	return probers, nil
}

func mkdir(dir *tricorder.DirectorySpec, name string) *tricorder.DirectorySpec {
	if name == "" {
		return dir
	}
	subdir, err := dir.RegisterDirectory(name)
	if err != nil {
		panic(err)
	}
	return subdir
}

func (probers proberList) Probe(logger *log.Logger) {
	for _, p := range probers {
		if err := p.Probe(); err != nil {
			logger.Println(err)
		}
	}
}

func (probers proberList) WriteHtml(writer io.Writer) {
	for _, p := range probers {
		if htmler, ok := p.(httpd.HtmlWriter); ok {
			htmler.WriteHtml(writer)
		}
	}
}
<commit_msg>Add line break between dashboard sections.<commit_after>package main

import (
	"fmt"
	"github.com/Symantec/health-agent/httpd"
	"github.com/Symantec/health-agent/probers/filesystems"
	"github.com/Symantec/health-agent/probers/loadavg"
	"github.com/Symantec/health-agent/probers/memory"
	"github.com/Symantec/health-agent/probers/netif"
	"github.com/Symantec/health-agent/probers/network"
	"github.com/Symantec/health-agent/probers/storage"
	"github.com/Symantec/health-agent/probers/systime"
	"github.com/Symantec/tricorder/go/tricorder"
	"io"
	"log"
)

type prober interface {
	Probe() error
}

type proberList []prober

func setupProbers() (proberList, error) {
	topMetricsDir, err := tricorder.RegisterDirectory("/sys")
	if err != nil {
		return nil, err
	}
	var probers proberList
	probers = append(probers, filesystems.Register(mkdir(topMetricsDir, "fs")))
	probers = append(probers, loadavg.Register(mkdir(topMetricsDir, "loadavg")))
	probers = append(probers, memory.Register(mkdir(topMetricsDir, "memory")))
	probers = append(probers, netif.Register(mkdir(topMetricsDir, "netif")))
	probers = append(probers, network.Register(mkdir(topMetricsDir, "network")))
	probers = append(probers, storage.Register(mkdir(topMetricsDir, "storage")))
	probers = append(probers, systime.Register(mkdir(topMetricsDir, "")))
	return probers, nil
}

func mkdir(dir *tricorder.DirectorySpec, name string) *tricorder.DirectorySpec {
	if name == "" {
		return dir
	}
	subdir, err := dir.RegisterDirectory(name)
	if err != nil {
		panic(err)
	}
	return subdir
}

func (probers proberList) Probe(logger *log.Logger) {
	for _, p := range probers {
		if err := p.Probe(); err != nil {
			logger.Println(err)
		}
	}
}

func (probers proberList) WriteHtml(writer io.Writer) {
	for _, p := range probers {
		if htmler, ok := p.(httpd.HtmlWriter); ok {
			htmler.WriteHtml(writer)
			fmt.Fprintln(writer, "<br>")
		}
	}
}

{'fraction_non_alphanumeric': 0.14686998394863562, 'fraction_numerical': 0.0, 'mean_word_length': 5.159802306425041, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3597508', 'n_tokens_mistral': 1422, 'n_tokens_neox': 1373, 'n_words': 242}