MCPcopy
hub / github.com/google/gvisor / debugString

Method debugString

tools/bigquery/bigquery.go:126–144  ·  view source on GitHub ↗

debugString writes debug information to the given string builder with the given prefix.

(sb *strings.Builder, prefix string)

Source from the content-addressed store, hash-verified

124// debugString writes debug information to the given string builder with the
125// given prefix.
126func (bm *Benchmark) debugString(sb *strings.Builder, prefix string) {
127 writeLine(sb, prefix, "Benchmark: %s", bm.Name)
128 if numConditions := len(bm.Condition); numConditions == 0 {
129 writeLine(sb, prefix, " Conditions: None.")
130 } else {
131 writeLine(sb, prefix, " Conditions (%d):", numConditions)
132 for _, condition := range bm.Condition {
133 condition.debugString(sb, prefix+" ")
134 }
135 }
136 if numMetrics := len(bm.Metric); numMetrics == 0 {
137 writeLine(sb, prefix, " Metrics: None.")
138 } else {
139 writeLine(sb, prefix, " Metrics (%d):", numMetrics)
140 for _, metric := range bm.Metric {
141 metric.debugString(sb, prefix+" ")
142 }
143 }
144}
145
146// noSpaceRe is used to remove whitespace characters in `noSpace`.
147var noSpaceRe = regexp.MustCompile("\\s+")

Callers 1

StringMethod · 0.95

Calls 2

writeLineFunction · 0.85
debugStringMethod · 0.45

Tested by

no test coverage detected