refractor to use the new metric framework
make the snapshot metric object serializable