Add a test.cpp to test the metrics system.