moodlehq / moodle-performance-comparison

Set of shell scripts to run Moodle performance tests using different hardware and configurations and compare results.
GNU General Public License v2.0
75 stars 39 forks source link

We are missing info #48

Open dmonllao opened 9 years ago

dmonllao commented 9 years ago

I'm sad :( https://tracker.moodle.org/browse/MDL-47900?focusedCommentId=320129&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-320129

We process the MDL_PERF data displayed on the page footer to know about how things went, but that's not the end of the page scripts, standard log db write-per-page-request is not counted here, and the same happens now when trying to test the events monitor; these db writes are executed before closing the page request in a register_shutdown_function() We are missing all this data and we want it, I am thinking on another register_shutdown_function() (ensuring that is the last registered function to be added) that will output whatever it is that we can parse later from this tool if MDL_PERF_TEST is enabled, and move from parsing the footer html like we currently do to parse this.

rajeshtaneja commented 9 years ago

Thanks for spotting this David, Will try get to this ASAP.

danpoltawski commented 9 years ago

Does it in end up in the error log if you use MDL_PERFTOLOG?

stronk7 commented 9 years ago

Copied from the Tracker, sorry I assumed incorrectly that it was a performance issue when it was not:

IMO then we must stop relying on footer information, I'm afraid.

Unless I'm wrong, output could be already close, some variables undefined and all sort of problems. So this change will require, for sure a lot of testing (different web servers, cgi...). Perhaps time to look for another communication channel different from page footer to gather all that information.

All this said with a pinch of salt, be warned. I've not facts defending my fear, just the feeling it can be dangerous.

Ciao :-)

dmonllao commented 9 years ago

Yes @danpoltawski, it should as core_shutdown_manager executes all subscribed shutdown functions, and, after that, writes to the error_log and stops the profiler https://github.com/moodle/moodle/blob/master/lib/classes/shutdown_manager.php#L103

dmonllao commented 9 years ago

I would add my vote to Dan's proposal of parsing web server error logs, but I don't think that we should restrict it to apache, probably there are already open source tools that takes care of the different logs format used by the different web servers.

dmonllao commented 9 years ago

Dirties patch ever to test event monitor https://github.com/dmonllao/moodle/commit/89564fd8243133b97d1f0cdbbeb3e6e6c87f29db catching all data, testing it now

dmonllao commented 9 years ago

(pasting from #48)

I'm currently testing an alternative to, instead of using MDL_PERFTOFOOT var + MDL_PERF_TEST (the one we created to catch data from redirects) remove all references to MDL_PERF_TEST and keep a simple echo $performanceinfo['txt'] at the end of the shutdown function based on MDL_PERF_TEST, the same place where we write to error_log. MDL_PERF_TEST is only set in this tool's tests (as a collateral damage we remove test testing frameworks references in codebase). Probably @danpoltawski can comment about it as he has experience working with apache logs, but this solution would work exactly like reading from apache logs but less trouble for what I can see. Using this alternative we will catch everything, including redirections. @danpoltawski, do you see any problem using this approach?

dmonllao commented 9 years ago

https://tracker.moodle.org/browse/MDL-49252