Clean up logging, update website filter hint

This commit is contained in:
2026-03-25 07:36:43 +01:00
parent 456452afc4
commit d0fb34160f
2 changed files with 4 additions and 2 deletions

View File

@@ -62,8 +62,10 @@ func Backfill(ctx context.Context, collectorAddrs []string, cache *Cache) {
mergeDump(r.coarse, coarseByTS) mergeDump(r.coarse, coarseByTS)
} }
mergeStart := time.Now()
fine := buildSnapshots(fineByTS, st.FineTopK, st.FineRingSize) fine := buildSnapshots(fineByTS, st.FineTopK, st.FineRingSize)
coarse := buildSnapshots(coarseByTS, st.CoarseTopK, st.CoarseRingSize) coarse := buildSnapshots(coarseByTS, st.CoarseTopK, st.CoarseRingSize)
log.Printf("backfill: merge+topk took %s", time.Since(mergeStart).Round(time.Microsecond))
if len(fine)+len(coarse) == 0 { if len(fine)+len(coarse) == 0 {
log.Printf("backfill: no data received from any collector") log.Printf("backfill: no data received from any collector")
@@ -71,7 +73,7 @@ func Backfill(ctx context.Context, collectorAddrs []string, cache *Cache) {
} }
loadStart := time.Now() loadStart := time.Now()
cache.LoadHistorical(fine, coarse) cache.LoadHistorical(fine, coarse)
log.Printf("backfill: loaded %d fine + %d coarse buckets in %s total", log.Printf("backfill: loaded %d fine + %d coarse buckets in %s",
len(fine), len(coarse), time.Since(loadStart).Round(time.Microsecond)) len(fine), len(coarse), time.Since(loadStart).Round(time.Microsecond))
} }

View File

@@ -32,7 +32,7 @@
<input type="hidden" name="w" value="{{.Params.WindowS}}"> <input type="hidden" name="w" value="{{.Params.WindowS}}">
<input type="hidden" name="by" value="{{.Params.GroupByS}}"> <input type="hidden" name="by" value="{{.Params.GroupByS}}">
<input type="hidden" name="n" value="{{.Params.N}}"> <input type="hidden" name="n" value="{{.Params.N}}">
<input class="filter-input" type="text" name="q" value="{{.FilterExpr}}" placeholder="status>=400 AND website~=gouda.* AND uri~=^/ct/v1/ AND is_tor=0 AND asn=8298"> <input class="filter-input" type="text" name="q" value="{{.FilterExpr}}" placeholder="status>=400 AND website!~=^gouda.* AND uri~=^/ct/v1/ AND is_tor=0 AND asn=8298">
<button type="submit">filter</button> <button type="submit">filter</button>
{{- if .FilterExpr}} <a class="clear" href="{{.ClearFilterURL}}">× clear</a>{{end}} {{- if .FilterExpr}} <a class="clear" href="{{.ClearFilterURL}}">× clear</a>{{end}}
</form> </form>