MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / dumpGC

Method dumpGC

server_info.go:160–181  ·  view source on GitHub ↗
(buf *bytes.Buffer)

Source from the content-addressed store, hash-verified

158)
159
160func (i *info) dumpGC(buf *bytes.Buffer) {
161 buf.WriteString("# GC\r\n")
162
163 count := 5
164
165 var st deb.GCStats
166 st.Pause = make([]time.Duration, count)
167
168 deb.ReadGCStats(&st)
169
170 h := make([]string, 0, count)
171
172 for i := 0; i < count && i < len(st.Pause); i++ {
173 h = append(h, st.Pause[i].String())
174 }
175
176 i.dumpPairs(buf, infoPair{"gc_last_time", st.LastGC.Format(gcTimeFormat)},
177 infoPair{"gc_num", st.NumGC},
178 infoPair{"gc_pause_total", st.PauseTotal.String()},
179 infoPair{"gc_pause_history", strings.Join(h, ",")},
180 )
181}
182
183func (i *info) dumpStore(buf *bytes.Buffer) {
184 buf.WriteString("# Store\r\n")

Callers 2

DumpMethod · 0.95
dumpAllMethod · 0.95

Calls 2

dumpPairsMethod · 0.95
StringMethod · 0.65

Tested by

no test coverage detected