8. A non-transitory computer readable medium storing instructions that cause one or more data processing apparatus to perform operations 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.
9. The computer readable medium of claim 8 , wherein the instructions cause the one or more data processing apparatus to perform operations comprising: receiving a second request for a second type of performance measure; determining that using the pre-aggregated dataset to determine a value for the second type of performance measure lowers a latency for responding to the second request relative to a latency for responding to the second request using the dataset to determine the value for the second type of performance measure; and increasing the benefit score for the pre-aggregated dataset in response to determining that using the pre-aggregated dataset to determine the value for the second type of performance measure lowers the latency for responding to the second request.