浏览代码

Merge pull request #10 from rauls5382/master

Extend regexp for matching legacy growth profiles
Josef Jelinek 9 年前
父节点
当前提交
8e479a1421
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      profile/legacy_profile.go

+ 2
- 2
profile/legacy_profile.go 查看文件

39
 
39
 
40
 	hexNumberRE = regexp.MustCompile(`0x[0-9a-f]+`)
40
 	hexNumberRE = regexp.MustCompile(`0x[0-9a-f]+`)
41
 
41
 
42
-	growthHeaderRE = regexp.MustCompile(`heap profile: *(\d+): *(\d+) *\[ *(\d+): *(\d+) *\] @ growthz`)
42
+	growthHeaderRE = regexp.MustCompile(`heap profile: *(\d+): *(\d+) *\[ *(\d+): *(\d+) *\] @ growthz?`)
43
 
43
 
44
-	fragmentationHeaderRE = regexp.MustCompile(`heap profile: *(\d+): *(\d+) *\[ *(\d+): *(\d+) *\] @ fragmentationz`)
44
+	fragmentationHeaderRE = regexp.MustCompile(`heap profile: *(\d+): *(\d+) *\[ *(\d+): *(\d+) *\] @ fragmentationz?`)
45
 
45
 
46
 	threadzStartRE = regexp.MustCompile(`--- threadz \d+ ---`)
46
 	threadzStartRE = regexp.MustCompile(`--- threadz \d+ ---`)
47
 	threadStartRE  = regexp.MustCompile(`--- Thread ([[:xdigit:]]+) \(name: (.*)/(\d+)\) stack: ---`)
47
 	threadStartRE  = regexp.MustCompile(`--- Thread ([[:xdigit:]]+) \(name: (.*)/(\d+)\) stack: ---`)