MCPcopy
hub / github.com/netdata/netdata / cloneChartAnalysis

Function cloneChartAnalysis

src/go/plugin/framework/metricsaudit/report.go:537–548  ·  view source on GitHub ↗
(src ChartAnalysis)

Source from the content-addressed store, hash-verified

535}
536
537func cloneChartAnalysis(src ChartAnalysis) ChartAnalysis {
538 dst := ChartAnalysis{
539 Chart: cloneChart(src.Chart),
540 CollectedValues: make(map[string][]int64, len(src.CollectedValues)),
541 SeenDimensions: make(map[string]bool, len(src.SeenDimensions)),
542 }
543 for id, values := range src.CollectedValues {
544 dst.CollectedValues[id] = append([]int64(nil), values...)
545 }
546 maps.Copy(dst.SeenDimensions, src.SeenDimensions)
547 return dst
548}
549
550func cloneChart(src *collectorapi.Chart) *collectorapi.Chart {
551 if src == nil {

Callers 1

cloneJobAnalysisFunction · 0.85

Calls 2

cloneChartFunction · 0.85
CopyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…