store metric history in sliding windows