tangled
alpha
login
or
join now
edavis.dev
/
bsky-tools
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
bsky-modactions: add 15m moving average smoothing
Eric Davis
6 months ago
e07a5289
f64c2254
+7
-6
1 changed file
expand all
collapse all
unified
split
cmd
bsky-modactions
munin.go
+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)
0
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
}