You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: nativehist.go
    path of file: ./repos/encore/runtimes/go/appruntime/shared/nativehist
    
    the code of the file until where you have to start completion: // This file is originally from Prometheus, which is licensed under the Apache License 2.0.
// See PROMETHEUS_LICENSE.txt for its license.

package nativehist

import (
	"fmt"
	"math"
	"sort"
	"sync"
	"sync/atomic"
)

func New(bucketFactor float64) *Histogram {
	return &Histogram{
		Schema: pickSchema(bucketFactor),
	}
}

type Histogram struct {
	// Order in this struct matters for the alignment required by atomic
	// operations, see http://golang.org/pkg/sync/atomic/#pkg-note-BUG
	Count uint64

	// NumZeroValues counts the number of observations in the zero bucket.
	NumZeroValues uint64

	// Schema is th
    
func addToBucket(buckets *sync.Map, key int, increment int64) bool {
	if existingBucket, ok := buckets.Load(key); ok {
		// Fast path without allocation.
		atomic.AddInt64(existingBucket.(*int64), increment)
		return false
	}
	// Bucket doesn't exist yet. Slow path allocating new counter.
	newBucket := increment // TODO(beorn7): Check if this is sufficient to not let increment escape.
	if actualBucket, loaded := buckets.LoadOrStore(key, &newBucket); loaded {
		// The bucket was created concurrently in another goroutine.
		// Have to increment after all.
		atomic.AddInt64(actualBucket.(*int64), increment)
		return false
	}
	return true
}