1. A computer-implemented method performed by one or more data processing apparatus, comprising: receiving one or more requests for a first type of performance measure; identifying, based on the one or more requests and from a dataset, a proper subset of data used to determine a value for the first type of performance measure; determining the value based on the proper subset of data; determining a first latency specifying an amount of time that was required to determine the value using the dataset; defining a pre-aggregated dataset that includes the proper subset of data from the dataset; calculating a benefit score for the pre-aggregated dataset based on a difference between the first latency and a second latency specifying an amount of time required to respond to the request using the pre-aggregated dataset; adjusting the benefit score as a rate of received queries for the first type of performance measure changes over time; determining, at a given time, that the adjusted benefit score meets a threshold value; and storing the pre-aggregated dataset in response to determining that the benefit score meets the threshold value.