Skip to content

Commit 9c65b57

Browse files
Copilotarl
andcommitted
Fix code formatting with gofmt
Co-authored-by: arl <476650+arl@users.noreply.github.com>
1 parent d57901e commit 9c65b57

File tree

2 files changed

+123
-123
lines changed

2 files changed

+123
-123
lines changed

internal/plot/layouts.go

Lines changed: 87 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -600,97 +600,97 @@ var allocFreeRatesLayout = Scatter{
600600
}
601601

602602
func stoppingPausesGCLayout(samples []metrics.Sample) Heatmap {
603-
idxstoppinggc := metricIdx["/sched/pauses/stopping/gc:seconds"]
604-
605-
stoppinggc := samples[idxstoppinggc].Value.Float64Histogram()
606-
histfactor := downsampleFactor(len(stoppinggc.Buckets), maxBuckets)
607-
buckets := downsampleBuckets(stoppinggc, histfactor)
608-
609-
return Heatmap{
610-
Name: "TODO(set later)",
611-
Title: "Stop-the-world Stopping Latencies (GC)",
612-
Type: "heatmap",
613-
UpdateFreq: 5,
614-
Colorscale: PinkShades,
615-
Buckets: floatseq(len(buckets)),
616-
CustomData: buckets,
617-
Hover: HeapmapHover{
618-
YName: "stopping duration",
619-
YUnit: "duration",
620-
ZName: "pauses",
621-
},
622-
Layout: HeatmapLayout{
623-
YAxis: HeatmapYaxis{
624-
Title: "stopping duration",
625-
TickMode: "array",
626-
TickVals: []float64{6, 13, 20, 26, 33, 39.5, 46, 53, 60, 66, 73, 79, 86},
627-
TickText: []float64{1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 5e-3, 1e-2, 5e-2, 1e-1, 5e-1, 1, 5, 10},
628-
},
629-
},
630-
InfoText: `This heatmap shows the distribution of individual GC-related stop-the-world stopping latencies. This is the time it takes from deciding to stop the world until all Ps are stopped. This is a subset of the total GC-related stop-the-world time. During this time, some threads may be executing. Uses <b>/sched/pauses/stopping/gc:seconds</b>.`,
631-
}
603+
idxstoppinggc := metricIdx["/sched/pauses/stopping/gc:seconds"]
604+
605+
stoppinggc := samples[idxstoppinggc].Value.Float64Histogram()
606+
histfactor := downsampleFactor(len(stoppinggc.Buckets), maxBuckets)
607+
buckets := downsampleBuckets(stoppinggc, histfactor)
608+
609+
return Heatmap{
610+
Name: "TODO(set later)",
611+
Title: "Stop-the-world Stopping Latencies (GC)",
612+
Type: "heatmap",
613+
UpdateFreq: 5,
614+
Colorscale: PinkShades,
615+
Buckets: floatseq(len(buckets)),
616+
CustomData: buckets,
617+
Hover: HeapmapHover{
618+
YName: "stopping duration",
619+
YUnit: "duration",
620+
ZName: "pauses",
621+
},
622+
Layout: HeatmapLayout{
623+
YAxis: HeatmapYaxis{
624+
Title: "stopping duration",
625+
TickMode: "array",
626+
TickVals: []float64{6, 13, 20, 26, 33, 39.5, 46, 53, 60, 66, 73, 79, 86},
627+
TickText: []float64{1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 5e-3, 1e-2, 5e-2, 1e-1, 5e-1, 1, 5, 10},
628+
},
629+
},
630+
InfoText: `This heatmap shows the distribution of individual GC-related stop-the-world stopping latencies. This is the time it takes from deciding to stop the world until all Ps are stopped. This is a subset of the total GC-related stop-the-world time. During this time, some threads may be executing. Uses <b>/sched/pauses/stopping/gc:seconds</b>.`,
631+
}
632632
}
633633

634634
func stoppingPausesOtherLayout(samples []metrics.Sample) Heatmap {
635-
idxstoppingother := metricIdx["/sched/pauses/stopping/other:seconds"]
636-
637-
stoppingother := samples[idxstoppingother].Value.Float64Histogram()
638-
histfactor := downsampleFactor(len(stoppingother.Buckets), maxBuckets)
639-
buckets := downsampleBuckets(stoppingother, histfactor)
640-
641-
return Heatmap{
642-
Name: "TODO(set later)",
643-
Title: "Stop-the-world Stopping Latencies (Other)",
644-
Type: "heatmap",
645-
UpdateFreq: 5,
646-
Colorscale: PinkShades,
647-
Buckets: floatseq(len(buckets)),
648-
CustomData: buckets,
649-
Hover: HeapmapHover{
650-
YName: "stopping duration",
651-
YUnit: "duration",
652-
ZName: "pauses",
653-
},
654-
Layout: HeatmapLayout{
655-
YAxis: HeatmapYaxis{
656-
Title: "stopping duration",
657-
TickMode: "array",
658-
TickVals: []float64{6, 13, 20, 26, 33, 39.5, 46, 53, 60, 66, 73, 79, 86},
659-
TickText: []float64{1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 5e-3, 1e-2, 5e-2, 1e-1, 5e-1, 1, 5, 10},
660-
},
661-
},
662-
InfoText: `This heatmap shows the distribution of individual non-GC-related stop-the-world stopping latencies. This is the time it takes from deciding to stop the world until all Ps are stopped. This is a subset of the total non-GC-related stop-the-world time. During this time, some threads may be executing. Uses <b>/sched/pauses/stopping/other:seconds</b>.`,
663-
}
635+
idxstoppingother := metricIdx["/sched/pauses/stopping/other:seconds"]
636+
637+
stoppingother := samples[idxstoppingother].Value.Float64Histogram()
638+
histfactor := downsampleFactor(len(stoppingother.Buckets), maxBuckets)
639+
buckets := downsampleBuckets(stoppingother, histfactor)
640+
641+
return Heatmap{
642+
Name: "TODO(set later)",
643+
Title: "Stop-the-world Stopping Latencies (Other)",
644+
Type: "heatmap",
645+
UpdateFreq: 5,
646+
Colorscale: PinkShades,
647+
Buckets: floatseq(len(buckets)),
648+
CustomData: buckets,
649+
Hover: HeapmapHover{
650+
YName: "stopping duration",
651+
YUnit: "duration",
652+
ZName: "pauses",
653+
},
654+
Layout: HeatmapLayout{
655+
YAxis: HeatmapYaxis{
656+
Title: "stopping duration",
657+
TickMode: "array",
658+
TickVals: []float64{6, 13, 20, 26, 33, 39.5, 46, 53, 60, 66, 73, 79, 86},
659+
TickText: []float64{1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 5e-3, 1e-2, 5e-2, 1e-1, 5e-1, 1, 5, 10},
660+
},
661+
},
662+
InfoText: `This heatmap shows the distribution of individual non-GC-related stop-the-world stopping latencies. This is the time it takes from deciding to stop the world until all Ps are stopped. This is a subset of the total non-GC-related stop-the-world time. During this time, some threads may be executing. Uses <b>/sched/pauses/stopping/other:seconds</b>.`,
663+
}
664664
}
665665

666666
func totalPausesOtherLayout(samples []metrics.Sample) Heatmap {
667-
idxtotalother := metricIdx["/sched/pauses/total/other:seconds"]
668-
669-
totalother := samples[idxtotalother].Value.Float64Histogram()
670-
histfactor := downsampleFactor(len(totalother.Buckets), maxBuckets)
671-
buckets := downsampleBuckets(totalother, histfactor)
672-
673-
return Heatmap{
674-
Name: "TODO(set later)",
675-
Title: "Stop-the-world Pause Latencies (Other)",
676-
Type: "heatmap",
677-
UpdateFreq: 5,
678-
Colorscale: PinkShades,
679-
Buckets: floatseq(len(buckets)),
680-
CustomData: buckets,
681-
Hover: HeapmapHover{
682-
YName: "pause duration",
683-
YUnit: "duration",
684-
ZName: "pauses",
685-
},
686-
Layout: HeatmapLayout{
687-
YAxis: HeatmapYaxis{
688-
Title: "pause duration",
689-
TickMode: "array",
690-
TickVals: []float64{6, 13, 20, 26, 33, 39.5, 46, 53, 60, 66, 73, 79, 86},
691-
TickText: []float64{1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 5e-3, 1e-2, 5e-2, 1e-1, 5e-1, 1, 5, 10},
692-
},
693-
},
694-
InfoText: `This heatmap shows the distribution of individual non-GC-related stop-the-world pause latencies. This is the time from deciding to stop the world until the world is started again. Some of this time is spent getting all threads to stop. Uses <b>/sched/pauses/total/other:seconds</b>.`,
695-
}
667+
idxtotalother := metricIdx["/sched/pauses/total/other:seconds"]
668+
669+
totalother := samples[idxtotalother].Value.Float64Histogram()
670+
histfactor := downsampleFactor(len(totalother.Buckets), maxBuckets)
671+
buckets := downsampleBuckets(totalother, histfactor)
672+
673+
return Heatmap{
674+
Name: "TODO(set later)",
675+
Title: "Stop-the-world Pause Latencies (Other)",
676+
Type: "heatmap",
677+
UpdateFreq: 5,
678+
Colorscale: PinkShades,
679+
Buckets: floatseq(len(buckets)),
680+
CustomData: buckets,
681+
Hover: HeapmapHover{
682+
YName: "pause duration",
683+
YUnit: "duration",
684+
ZName: "pauses",
685+
},
686+
Layout: HeatmapLayout{
687+
YAxis: HeatmapYaxis{
688+
Title: "pause duration",
689+
TickMode: "array",
690+
TickVals: []float64{6, 13, 20, 26, 33, 39.5, 46, 53, 60, 66, 73, 79, 86},
691+
TickText: []float64{1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 5e-3, 1e-2, 5e-2, 1e-1, 5e-1, 1, 5, 10},
692+
},
693+
},
694+
InfoText: `This heatmap shows the distribution of individual non-GC-related stop-the-world pause latencies. This is the time from deciding to stop the world until the world is started again. Some of this time is spent getting all threads to stop. Uses <b>/sched/pauses/total/other:seconds</b>.`,
695+
}
696696
}

internal/plot/plots.go

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -985,74 +985,74 @@ func floatseq(n int) []float64 {
985985
// stopping pauses (GC)
986986

987987
type stoppingPausesGC struct {
988-
histfactor int
989-
counts [maxBuckets]uint64
988+
histfactor int
989+
counts [maxBuckets]uint64
990990

991-
idxstoppinggc int
991+
idxstoppinggc int
992992
}
993993

994994
func makeStoppingPausesGC(indices ...int) metricsGetter {
995-
return &stoppingPausesGC{
996-
idxstoppinggc: indices[0],
997-
}
995+
return &stoppingPausesGC{
996+
idxstoppinggc: indices[0],
997+
}
998998
}
999999

10001000
func (p *stoppingPausesGC) values(samples []metrics.Sample) any {
1001-
if p.histfactor == 0 {
1002-
stoppinggc := samples[p.idxstoppinggc].Value.Float64Histogram()
1003-
p.histfactor = downsampleFactor(len(stoppinggc.Buckets), maxBuckets)
1004-
}
1001+
if p.histfactor == 0 {
1002+
stoppinggc := samples[p.idxstoppinggc].Value.Float64Histogram()
1003+
p.histfactor = downsampleFactor(len(stoppinggc.Buckets), maxBuckets)
1004+
}
10051005

1006-
stoppinggc := samples[p.idxstoppinggc].Value.Float64Histogram()
1007-
return downsampleCounts(stoppinggc, p.histfactor, p.counts[:])
1006+
stoppinggc := samples[p.idxstoppinggc].Value.Float64Histogram()
1007+
return downsampleCounts(stoppinggc, p.histfactor, p.counts[:])
10081008
}
10091009

10101010
// stopping pauses (Other)
10111011

10121012
type stoppingPausesOther struct {
1013-
histfactor int
1014-
counts [maxBuckets]uint64
1013+
histfactor int
1014+
counts [maxBuckets]uint64
10151015

1016-
idxstoppingother int
1016+
idxstoppingother int
10171017
}
10181018

10191019
func makeStoppingPausesOther(indices ...int) metricsGetter {
1020-
return &stoppingPausesOther{
1021-
idxstoppingother: indices[0],
1022-
}
1020+
return &stoppingPausesOther{
1021+
idxstoppingother: indices[0],
1022+
}
10231023
}
10241024

10251025
func (p *stoppingPausesOther) values(samples []metrics.Sample) any {
1026-
if p.histfactor == 0 {
1027-
stoppingother := samples[p.idxstoppingother].Value.Float64Histogram()
1028-
p.histfactor = downsampleFactor(len(stoppingother.Buckets), maxBuckets)
1029-
}
1026+
if p.histfactor == 0 {
1027+
stoppingother := samples[p.idxstoppingother].Value.Float64Histogram()
1028+
p.histfactor = downsampleFactor(len(stoppingother.Buckets), maxBuckets)
1029+
}
10301030

1031-
stoppingother := samples[p.idxstoppingother].Value.Float64Histogram()
1032-
return downsampleCounts(stoppingother, p.histfactor, p.counts[:])
1031+
stoppingother := samples[p.idxstoppingother].Value.Float64Histogram()
1032+
return downsampleCounts(stoppingother, p.histfactor, p.counts[:])
10331033
}
10341034

10351035
// total pauses (Other)
10361036

10371037
type totalPausesOther struct {
1038-
histfactor int
1039-
counts [maxBuckets]uint64
1038+
histfactor int
1039+
counts [maxBuckets]uint64
10401040

1041-
idxtotalother int
1041+
idxtotalother int
10421042
}
10431043

10441044
func makeTotalPausesOther(indices ...int) metricsGetter {
1045-
return &totalPausesOther{
1046-
idxtotalother: indices[0],
1047-
}
1045+
return &totalPausesOther{
1046+
idxtotalother: indices[0],
1047+
}
10481048
}
10491049

10501050
func (p *totalPausesOther) values(samples []metrics.Sample) any {
1051-
if p.histfactor == 0 {
1052-
totalother := samples[p.idxtotalother].Value.Float64Histogram()
1053-
p.histfactor = downsampleFactor(len(totalother.Buckets), maxBuckets)
1054-
}
1051+
if p.histfactor == 0 {
1052+
totalother := samples[p.idxtotalother].Value.Float64Histogram()
1053+
p.histfactor = downsampleFactor(len(totalother.Buckets), maxBuckets)
1054+
}
10551055

1056-
totalother := samples[p.idxtotalother].Value.Float64Histogram()
1057-
return downsampleCounts(totalother, p.histfactor, p.counts[:])
1056+
totalother := samples[p.idxtotalother].Value.Float64Histogram()
1057+
return downsampleCounts(totalother, p.histfactor, p.counts[:])
10581058
}

0 commit comments

Comments
 (0)