state total metric

Maybe let's do a nicer-errors PR so this can land though?