UPDATE 2020:
For individual self-closed tags or tags with blocks of code I developed an addon that measures time of execution and RAM used via parameter get_time='1' which automatically works for 98% of tags.
Ok, this is the undocumented feature I like to discover and try. I give it to you as a present for the new year
(with duly respect to KK, of course, who prepared this fun)
I have tried to measure speed of loading and generating pages without knowing this trick. So, if you are looking for some more fun with Couch - this is for you. As a bonus, you'd see the number of queries, perfomed while showing the php template.
1st. Check cms.php in /couchdir. Scroll to the bottom, line 340.
Check this part of code and change it this way:
Now, to be able to turn this on and off at will, leaving the core couch file untouched,
let's add an option to config.php, to the bottom:
SO, to disable this - comment out the last line. It is not enough to put 0 there, the whole thing should be commented with //.
With this, you'd have every page with something like this:
Happy celebrations
//
For individual self-closed tags or tags with blocks of code I developed an addon that measures time of execution and RAM used via parameter get_time='1' which automatically works for 98% of tags.
Ok, this is the undocumented feature I like to discover and try. I give it to you as a present for the new year

I have tried to measure speed of loading and generating pages without knowing this trick. So, if you are looking for some more fun with Couch - this is for you. As a bonus, you'd see the number of queries, perfomed while showing the php template.
1st. Check cms.php in /couchdir. Scroll to the bottom, line 340.
Check this part of code and change it this way:
- Code: Select all
if( defined('K_IS_MY_TEST_MACHINE') ){
// $html .= "\n<!-- in: ".k_timer_stop()." -->\n";
$html .= "\n<p> in: ".k_timer_stop()." </p>\n";
// $html .= "\n<!-- Queries: ".$DB->queries." -->\n";
$html .= "\n<p> Queries: ".$DB->queries." </p>\n";
}
Now, to be able to turn this on and off at will, leaving the core couch file untouched,
let's add an option to config.php, to the bottom:
- Code: Select all
//Show seconds and queries:
//cms.php, line 340.
define( 'K_IS_MY_TEST_MACHINE', 1 );
SO, to disable this - comment out the last line. It is not enough to put 0 there, the whole thing should be commented with //.
With this, you'd have every page with something like this:
in: 1.124 sec
Queries: 16
Happy celebrations

//
