| 158 | ) |
| 159 | |
| 160 | func (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 | |
| 183 | func (i *info) dumpStore(buf *bytes.Buffer) { |
| 184 | buf.WriteString("# Store\r\n") |