Skip to content

Instantly share code, notes, and snippets.

Claudio Benfatto claudio-benfatto

Block or report user

Report or block claudio-benfatto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@claudio-benfatto
claudio-benfatto / carbonserver.go
Created Jul 7, 2017
carbonserver proposed fix
View carbonserver.go
func (listener *CarbonserverListener) updateAccessedMetrics(details map[string]*pb.MetricDetails) map[string]struct{} {
fidx := listener.CurrentFileIndex()
accessedMetrics := make(map[string]struct{})
if fidx != nil {
fidx.Lock()
defer fidx.Unlock()
for m := range fidx.accessedMetrics {
accessedMetrics[m] = struct{}{}
}
View gist:a925d48573302e585052e9a2e68a5671
package main_test
import (
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/jriguera/metron-throughput/receiver"
You can’t perform that action at this time.