Skip to content

Commit

Permalink
Merge pull request #1 from zeebo/patch-1
Browse files Browse the repository at this point in the history
Fixed bug to make the series actually respect maxLen.
  • Loading branch information
nf committed Aug 17, 2011
2 parents 55caafa + 569d017 commit 503ea35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/stats.go
Expand Up @@ -52,7 +52,7 @@ func (s *Server) Update(args *stat.Point, r *struct{}) os.Error {
s.series[key] = append(s.series[key], [2]int64{second, args.Value})
// trim series to maxLen
if sk := s.series[key]; len(sk) > *maxLen {
sk = sk[len(sk)-*maxLen:]
s.series[key] = sk[len(sk)-*maxLen:]
}
return nil
}
Expand Down

0 comments on commit 503ea35

Please sign in to comment.