Просмотр исходного кода

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

Alexey Alexandrov 6 лет назад
Родитель
Сommit
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,7 +134,7 @@ func parseJavaHeader(pType string, b []byte, p *Profile) ([]byte, error) {
134 134
 				}
135 135
 			case "contention/resolution":
136 136
 				p.SampleType = []*ValueType{
137
-					{Type: "contentions", Unit: value},
137
+					{Type: "contentions", Unit: "count"},
138 138
 					{Type: "delay", Unit: value},
139 139
 				}
140 140
 			case "contention/sampling period":

+ 1
- 1
profile/testdata/java.contention.string Просмотреть файл

@@ -2,7 +2,7 @@ PeriodType: contentions count
2 2
 Period: 100
3 3
 Duration: 1h40
4 4
 Samples:
5
-contentions/microseconds delay/microseconds
5
+contentions/count delay/microseconds
6 6
         100        100: 1 2 
7 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 8
         200        200: 1 2