measure memory usage over time