Hard to answer without more info.
Getting the data from the DB will be about the same in each case.
Converting it to an image (WMS) or GeoJSON will depend on the number and size of the features.
Transmitting the data to the client will again depend on the size and number of features, for small datasets GeoJSON will be faster but for larger or more ...
The debug info can be forwarded into file that is defined with MS_ERRORFILE configuration option https://mapserver.org/mapfile/map.html
CONFIG "MS_ERRORFILE" "/path/to/errorfile.log"
Debug level 2 or higher is needed for including timings from msDrawMap().
Debug can be set at MAP level when it affects all the layers, of individually at LAYER level. Layer ...