Pārlūkot izejas kodu

Tighten the growth/fragmentation regexp to only allow an optional z.

Raul Silvera 9 gadus atpakaļ
vecāks
revīzija
f263fcbe49
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2
    2
      profile/legacy_profile.go

+ 2
- 2
profile/legacy_profile.go Parādīt failu

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+) *\] @ growth.?`)
42
+	growthHeaderRE = regexp.MustCompile(`heap profile: *(\d+): *(\d+) *\[ *(\d+): *(\d+) *\] @ growthz?`)
43
 
43
 
44
-	fragmentationHeaderRE = regexp.MustCompile(`heap profile: *(\d+): *(\d+) *\[ *(\d+): *(\d+) *\] @ fragmentation.?`)
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: ---`)