Sample corresponds to Profile.Sample
| 73 | |
| 74 | // Sample corresponds to Profile.Sample |
| 75 | type Sample struct { |
| 76 | Location []*Location |
| 77 | Value []int64 |
| 78 | // Label is a per-label-key map to values for string labels. |
| 79 | // |
| 80 | // In general, having multiple values for the given label key is strongly |
| 81 | // discouraged - see docs for the sample label field in profile.proto. The |
| 82 | // main reason this unlikely state is tracked here is to make the |
| 83 | // decoding->encoding roundtrip not lossy. But we expect that the value |
| 84 | // slices present in this map are always of length 1. |
| 85 | Label map[string][]string |
| 86 | // NumLabel is a per-label-key map to values for numeric labels. See a note |
| 87 | // above on handling multiple values for a label. |
| 88 | NumLabel map[string][]int64 |
| 89 | // NumUnit is a per-label-key map to the unit names of corresponding numeric |
| 90 | // label values. The unit info may be missing even if the label is in |
| 91 | // NumLabel, see the docs in profile.proto for details. When the value is |
| 92 | // slice is present and not nil, its length must be equal to the length of |
| 93 | // the corresponding value slice in NumLabel. |
| 94 | NumUnit map[string][]string |
| 95 | |
| 96 | locationIDX []uint64 |
| 97 | labelX []label |
| 98 | } |
| 99 | |
| 100 | // label corresponds to Profile.Label |
| 101 | type label struct { |
nothing calls this directly
no outgoing calls
no test coverage detected