@@ -384,7 +384,7 @@ func newFieldMapper(fields ...Field) (fieldMapper, error) {
384
384
// +checkescape:all
385
385
//
386
386
//go:nosplit
387
- func (m fieldMapper ) lookupSingle (fieldIndex int , fieldValue * FieldValue , idx , remainingCombinationBucket int ) (int , int ) {
387
+ func (m * fieldMapper ) lookupSingle (fieldIndex int , fieldValue * FieldValue , idx , remainingCombinationBucket int ) (int , int ) {
388
388
field := m .fields [fieldIndex ]
389
389
numValues := len (field .values )
390
390
@@ -422,7 +422,7 @@ func (m fieldMapper) lookupSingle(fieldIndex int, fieldValue *FieldValue, idx, r
422
422
// +checkescape:all
423
423
//
424
424
//go:nosplit
425
- func (m fieldMapper ) lookupConcat (fields1 , fields2 []* FieldValue ) int {
425
+ func (m * fieldMapper ) lookupConcat (fields1 , fields2 []* FieldValue ) int {
426
426
if (len (fields1 ) + len (fields2 )) != len (m .fields ) {
427
427
panic ("invalid field lookup depth" )
428
428
}
@@ -447,15 +447,15 @@ func (m fieldMapper) lookupConcat(fields1, fields2 []*FieldValue) int {
447
447
// +checkescape:all
448
448
//
449
449
//go:nosplit
450
- func (m fieldMapper ) lookup (fields ... * FieldValue ) int {
450
+ func (m * fieldMapper ) lookup (fields ... * FieldValue ) int {
451
451
return m .lookupConcat (fields , nil )
452
452
}
453
453
454
454
// numKeys returns the total number of key-to-field-combinations mappings
455
455
// defined by the fieldMapper.
456
456
//
457
457
//go:nosplit
458
- func (m fieldMapper ) numKeys () int {
458
+ func (m * fieldMapper ) numKeys () int {
459
459
return m .numFieldCombinations
460
460
}
461
461
@@ -464,7 +464,7 @@ func (m fieldMapper) numKeys() int {
464
464
// accessed using index "keys" made by fieldMapper.
465
465
// - The second level corresponds to buckets within a metric. The number of
466
466
// buckets is specified by numBuckets.
467
- func (m fieldMapper ) makeDistributionSampleMap (numBuckets int ) [][]atomicbitops.Uint64 {
467
+ func (m * fieldMapper ) makeDistributionSampleMap (numBuckets int ) [][]atomicbitops.Uint64 {
468
468
samples := make ([][]atomicbitops.Uint64 , m .numKeys ())
469
469
for i := range samples {
470
470
samples [i ] = make ([]atomicbitops.Uint64 , numBuckets )
@@ -475,7 +475,7 @@ func (m fieldMapper) makeDistributionSampleMap(numBuckets int) [][]atomicbitops.
475
475
// keyToMultiField is the reverse of lookup/lookupConcat. The returned list of
476
476
// field values corresponds to the same order of fields that were passed in to
477
477
// newFieldMapper.
478
- func (m fieldMapper ) keyToMultiField (key int ) []string {
478
+ func (m * fieldMapper ) keyToMultiField (key int ) []string {
479
479
depth := len (m .fields )
480
480
if depth == 0 && key == 0 {
481
481
return nil
@@ -495,7 +495,7 @@ func (m fieldMapper) keyToMultiField(key int) []string {
495
495
// `len(m.fields)`.
496
496
//
497
497
//go:nosplit
498
- func (m fieldMapper ) keyToMultiFieldInPlace (key int , fieldValues []* FieldValue ) {
498
+ func (m * fieldMapper ) keyToMultiFieldInPlace (key int , fieldValues []* FieldValue ) {
499
499
if len (m .fields ) == 0 {
500
500
return
501
501
}
@@ -1386,10 +1386,10 @@ func EmitMetricUpdate() {
1386
1386
if (! ok && metricValue == 0 ) || (ok && prev .([]uint64 )[fieldKey ] == metricValue ) {
1387
1387
continue
1388
1388
}
1389
-
1389
+ uint64M := allMetrics . uint64Metrics [ k ]
1390
1390
m .Metrics = append (m .Metrics , & pb.MetricValue {
1391
1391
Name : k ,
1392
- FieldValues : allMetrics . uint64Metrics [ k ] .fieldMapper .keyToMultiField (fieldKey ),
1392
+ FieldValues : uint64M .fieldMapper .keyToMultiField (fieldKey ),
1393
1393
Value : & pb.MetricValue_Uint64Value {Uint64Value : metricValue },
1394
1394
})
1395
1395
}
0 commit comments