this repo has no description

bsky-modactions: add 15m moving average smoothing

+7 -6
+7 -6
cmd/bsky-modactions/munin.go
··· 27 return 28 } 29 30 - fmt.Fprint(w, "graph_title bluesky labels added (top 8)\n") 31 fmt.Fprint(w, "graph_category bluesky\n") 32 fmt.Fprint(w, "graph_vlabel labels / ${graph_period}\n") 33 fmt.Fprint(w, "graph_period minute\n") 34 fmt.Fprint(w, "graph_width 600\n") 35 fmt.Fprint(w, "graph_height 300\n") 36 37 - for _, label := range labels { 38 - slug := sanitize.ReplaceAll([]byte(label), []byte("_")) 39 - fmt.Fprintf(w, "%s.label %s\n", slug, label) 40 fmt.Fprintf(w, "%s.type DERIVE\n", slug) 41 } 42 } 43 ··· 49 } 50 51 for _, label := range labels { 52 - key := label.Member.(string) 53 - slug := sanitize.ReplaceAll([]byte(key), []byte("_")) 54 fmt.Fprintf(w, "%s.value %0.f\n", slug, label.Score) 55 } 56 }
··· 27 return 28 } 29 30 + fmt.Fprint(w, "graph_title bluesky labels added (top 8, 15m MA)\n") 31 fmt.Fprint(w, "graph_category bluesky\n") 32 fmt.Fprint(w, "graph_vlabel labels / ${graph_period}\n") 33 fmt.Fprint(w, "graph_period minute\n") 34 fmt.Fprint(w, "graph_width 600\n") 35 fmt.Fprint(w, "graph_height 300\n") 36 37 + for _, labelName := range labels { 38 + slug := sanitize.ReplaceAll([]byte(labelName), []byte("_")) 39 + fmt.Fprintf(w, "%s.label %s\n", slug, labelName) 40 fmt.Fprintf(w, "%s.type DERIVE\n", slug) 41 + fmt.Fprintf(w, "%s.cdef %s,900,TRENDNAN\n", slug, slug) 42 } 43 } 44 ··· 50 } 51 52 for _, label := range labels { 53 + labelName := label.Member.(string) 54 + slug := sanitize.ReplaceAll([]byte(labelName), []byte("_")) 55 fmt.Fprintf(w, "%s.value %0.f\n", slug, label.Score) 56 } 57 }