Sloc metrics and collect statistics