Issue #285: log performances of script
* logs normal views and json API perfs
* logging works only in DEBUG mode and with the PERF_CHECK constant set to True