Нема описа

123456789101112131415161718192021222324
  1. package pprof
  2. import (
  3. "github.com/google/pprof/profile"
  4. "io/ioutil"
  5. "testing"
  6. )
  7. func TestParseData(t *testing.T) {
  8. const path = "testdata/"
  9. files, err := ioutil.ReadDir(path)
  10. if err != nil {
  11. t.Errorf("Problem reading directory %s : %v", path, err)
  12. }
  13. for _, f := range files {
  14. file := path + f.Name()
  15. inbytes, err := ioutil.ReadFile(file)
  16. if err != nil {
  17. t.Errorf("Problem reading file: %s : %v", file, err)
  18. continue
  19. }
  20. profile.ParseData(inbytes)
  21. }
  22. }