benchexport

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCSV

func LoadCSV[T any](reader io.Reader) ([]T, error)

LoadCSV loads a slice of any struct type from a CSV file, using JSON tags for fields. - gets the header from the first line of the CSV file, maps the header to the struct fields - reads the CSV file and converts each row to a JSON string. - unmarshals the JSON string to a struct. - returns the slice of structs.

func SaveAsMarkdown

func SaveAsMarkdown(input SaveAsMarkdownInput) error

SaveAsMarkdown is the main entry point.

func SaveOrAppendToCSV

func SaveOrAppendToCSV[T any](data []T, filePath string) error

SaveOrAppendToCSV saves a slice of any struct type to a CSV file, using JSON tags for headers. - appends the data to the file if it already exists, or creates it if it doesn't exist. - writes the header based on the struct tags if the file is empty. - uses reflection to get the struct tags and write the header and data to the file.

Types

type SaveAsMarkdownInput

type SaveAsMarkdownInput struct {
	Results      []SavedResults
	CurrentDate  time.Time
	InstanceType string
	FilePath     string
}

type SavedResults

type SavedResults struct {
	Procedure       string `json:"procedure"`
	BranchingFactor int    `json:"branching_factor"`
	QtyStreams      int    `json:"qty_streams"`
	DataPoints      int    `json:"data_points"`
	DurationMs      int64  `json:"duration_ms"`
	Visibility      string `json:"visibility"`
	Samples         int    `json:"samples"`
	UnixOnly        bool   `json:"unix_only"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL