A simple fixed-size array/history for node.js with some light statistical methods. Intended for use with numeric values, e.g. what were the response times for the last 100 requests processed, and what were their min, max, and mean.

var FixedArray =require("fixed-array");

var request_log = FixedArray(100);

// ... in your http server after processing your requests:

request_log.push(request_time);

// ... later, when you're interested in looking at stats:

var min = request_log.min();

var max = request_log.max();

var mean = request_log.mean();

Another example use it to easily track the min and max values of a series: