add IMetricWriter interface
Merge pull request #284 from fourk/add_imetric_writer

add IMetricWriter interface