MCPcopy
hub / github.com/grafana/k6 / ToMachineReadable

Function ToMachineReadable

internal/lib/summary/machine_readable.go:19–26  ·  view source on GitHub ↗

ToMachineReadable takes a Summary and Meta and builds a machine-readable summary [machinereadable.Summary] from them.

(s *Summary, meta Meta)

Source from the content-addressed store, hash-verified

17
18// ToMachineReadable takes a Summary and Meta and builds a machine-readable summary [machinereadable.Summary] from them.
19func ToMachineReadable(s *Summary, meta Meta) (machinereadable.Summary, error) {
20 return machinereadable.NewSummaryBuilder().
21 Config(machineReadableSummaryConfigBuilder(s, meta)).
22 Metadata(machineReadableSummaryMetadataBuilder()).
23 Results(machineReadableSummaryResultsBuilder(s)).
24 Version(machinereadable.SchemaVersion).
25 Build()
26}
27
28func machineReadableSummaryConfigBuilder(s *Summary, meta Meta) *machinereadable.SummarySummaryConfigBuilder {
29 executionType := machinereadable.SummarySummaryConfigExecutionLocal

Callers 1

prepareHandleSummaryCallFunction · 0.92

Calls 9

NewSummaryBuilderFunction · 0.92
MetadataMethod · 0.80
ConfigMethod · 0.80
BuildMethod · 0.65
VersionMethod · 0.65
ResultsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…