(b *buffer)
| 131 | } |
| 132 | |
| 133 | func (p *Profile) encode(b *buffer) { |
| 134 | for _, x := range p.SampleType { |
| 135 | encodeMessage(b, 1, x) |
| 136 | } |
| 137 | for _, x := range p.Sample { |
| 138 | encodeMessage(b, 2, x) |
| 139 | } |
| 140 | for _, x := range p.Mapping { |
| 141 | encodeMessage(b, 3, x) |
| 142 | } |
| 143 | for _, x := range p.Location { |
| 144 | encodeMessage(b, 4, x) |
| 145 | } |
| 146 | for _, x := range p.Function { |
| 147 | encodeMessage(b, 5, x) |
| 148 | } |
| 149 | encodeStrings(b, 6, p.stringTable) |
| 150 | encodeInt64Opt(b, 7, p.dropFramesX) |
| 151 | encodeInt64Opt(b, 8, p.keepFramesX) |
| 152 | encodeInt64Opt(b, 9, p.TimeNanos) |
| 153 | encodeInt64Opt(b, 10, p.DurationNanos) |
| 154 | if pt := p.PeriodType; pt != nil && (pt.typeX != 0 || pt.unitX != 0) { |
| 155 | encodeMessage(b, 11, p.PeriodType) |
| 156 | } |
| 157 | encodeInt64Opt(b, 12, p.Period) |
| 158 | encodeInt64s(b, 13, p.commentX) |
| 159 | encodeInt64(b, 14, p.defaultSampleTypeX) |
| 160 | encodeInt64Opt(b, 15, p.docURLX) |
| 161 | } |
| 162 | |
| 163 | var profileDecoder = []decoder{ |
| 164 | nil, // 0 |
nothing calls this directly
no test coverage detected