mem: trim trailing * when checking for globs
mem: include current second in topk calculations
demo: correctly rewrite metric names during topk queries