Add statistics functions to the virt module