浏览代码

Fix wrong unit type for contention count when parsing legacy Java profiles. (#404)

Alexey Alexandrov 7 年前
父节点
当前提交
cf6d271c80
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      profile/legacy_java_profile.go
  2. 1
    1
      profile/testdata/java.contention.string

+ 1
- 1
profile/legacy_java_profile.go 查看文件

134
 				}
134
 				}
135
 			case "contention/resolution":
135
 			case "contention/resolution":
136
 				p.SampleType = []*ValueType{
136
 				p.SampleType = []*ValueType{
137
-					{Type: "contentions", Unit: value},
137
+					{Type: "contentions", Unit: "count"},
138
 					{Type: "delay", Unit: value},
138
 					{Type: "delay", Unit: value},
139
 				}
139
 				}
140
 			case "contention/sampling period":
140
 			case "contention/sampling period":

+ 1
- 1
profile/testdata/java.contention.string 查看文件

2
 Period: 100
2
 Period: 100
3
 Duration: 1h40
3
 Duration: 1h40
4
 Samples:
4
 Samples:
5
-contentions/microseconds delay/microseconds
5
+contentions/count delay/microseconds
6
         100        100: 1 2 
6
         100        100: 1 2 
7
         100       1400: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 10 17 18 19 20 21 22 23 24 25 26 27 28 29 
7
         100       1400: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 10 17 18 19 20 21 22 23 24 25 26 27 28 29 
8
         200        200: 1 2 
8
         200        200: 1 2