refactor metrics handling (to be dict based instead of list), add --state-file to get delta metrics