(path string, file string, out map[string]uint64)
| 727 | } |
| 728 | |
| 729 | func readKVStatsFile(path string, file string, out map[string]uint64) error { |
| 730 | f, err := os.Open(filepath.Join(path, file)) |
| 731 | if err != nil { |
| 732 | return err |
| 733 | } |
| 734 | defer f.Close() |
| 735 | |
| 736 | s := bufio.NewScanner(f) |
| 737 | for s.Scan() { |
| 738 | name, value, err := parseKV(s.Text()) |
| 739 | if err != nil { |
| 740 | return fmt.Errorf("error while parsing %s (line=%q): %w", filepath.Join(path, file), s.Text(), err) |
| 741 | } |
| 742 | out[name] = value |
| 743 | } |
| 744 | return s.Err() |
| 745 | } |
| 746 | |
| 747 | func (c *Manager) Freeze() error { |
| 748 | return c.freeze(c.path, Frozen) |
no test coverage detected
searching dependent graphs…