Add docstat macro

POC to discuss about the implementation details