Maintain totals in addition to intervals and added dynvarsize pragma.