Ben Posted April 1, 2016 Share Posted April 1, 2016 Perfmon Debug Toolbar is a Processwire module used in performance monitoring and optimization. This module has been kicking around for some time, but I finally got around to publishing it. The user interface is heavilly influenced by django-debug-toolbar if anyone is familiar with that project. During install, $config->debug must be set to true for the toolbar to run, the module is not intended to be enabled on production. The primary goal of the module is to identify bottlenecks and help tune up code. More information is here: https://github.com/KeeneState/DebugPerfmon Please let me know if you have any difficulty installing or running it. It's intended to be run on a development instance, though it can exist in a dormant state in production. Collapsed presentation (top right of screen): Expanded Presentation: 16 Link to comment Share on other sites More sharing options...
netcarver Posted April 2, 2016 Share Posted April 2, 2016 Hi Ben, Just wanted to say thank-you for this module. I'm trying it out now and am really liking it! 1 Link to comment Share on other sites More sharing options...
adrian Posted April 6, 2016 Share Posted April 6, 2016 Hi Ben, On PW 3.x I get this error. I haven't tested on 2.x Fatal error: Access to undeclared static property: ProcessWire\Wire::$allLocalHooks in /Users/ajones/Sites/pwtest/site/assets/cache/FileCompiler/site/modules/DebugPerfmon/DebugPerfmon.module on line 122 Call Stack: 1.3810 30980112 1. DebugPerfmon->generate() /Users/ajones/Sites/pwtest/site/assets/cache/FileCompiler/site/modules/DebugPerfmon/DebugPerfmon.module:0 Link to comment Share on other sites More sharing options...
adrian Posted April 6, 2016 Share Posted April 6, 2016 I decided to look into this. It's definitely related to PW 3 vs 2. For 3.x you need this instead: $hooks = array_merge(wire('pages')->getHooks('*'), wire('hooks')->getAllLocalHooks()); In Tracy I just used a conditional based on whether: wire('config')->version is >= 3 5 Link to comment Share on other sites More sharing options...
Ben Posted April 11, 2016 Author Share Posted April 11, 2016 Thanks Adrian, I'll get this update into the github repo this week--definitely a big plus to get 3.0 compatibility. Update: fix is on github, and version revved to 1.0.1--somewhat off topic, but do any module developers know if module pages (modules.processwire.com) pick up changes on github? 1 Link to comment Share on other sites More sharing options...
adrian Posted April 11, 2016 Share Posted April 11, 2016 Thanks Adrian, I'll get this update into the github repo this week--definitely a big plus to get 3.0 compatibility. Update: fix is on github, and version revved to 1.0.1--somewhat off topic, but do any module developers know if module pages (modules.processwire.com) pick up changes on github? Thanks for the update. Yes, the modules directory will update from Github once a day, but you can also manually update it by simply editing your module in the directory and saving. 1 Link to comment Share on other sites More sharing options...
Ben Posted April 11, 2016 Author Share Posted April 11, 2016 I didn't see the edit button, very cool. Thanks. Link to comment Share on other sites More sharing options...
adrian Posted April 11, 2016 Share Posted April 11, 2016 No problem. One tiny thing I am noticing with your module. There is a quick FOUC when the page loads. Not a huge deal, but it would be nice if the details frame was hidden until the JS kicks in to collapse it. Link to comment Share on other sites More sharing options...
Ben Posted April 11, 2016 Author Share Posted April 11, 2016 I can take a look at that, for whatever reason I'm not seeing the flash, maybe a browser thing but I should be able to track it down. By "details frame," are you referring to the area with the blue heading covering the majority of the page, or the summary off to the right? Link to comment Share on other sites More sharing options...
adrian Posted April 11, 2016 Share Posted April 11, 2016 I am on Chrome/OSX What I am seeing is content from the area with the blue heading. It isn't styled though - just a bunch of text at the bottom left of the page. It only happens when viewing the PW admin - not seeing it on the front-end at all. Link to comment Share on other sites More sharing options...
Ben Posted April 11, 2016 Author Share Posted April 11, 2016 I think the FOUC has been squashed in github (1.0.2). Thanks for the report, Adrian. 1 Link to comment Share on other sites More sharing options...
adrian Posted April 11, 2016 Share Posted April 11, 2016 I think the FOUC has been squashed in github (1.0.2). Thanks for the report, Adrian. Works great now - thanks! 1 Link to comment Share on other sites More sharing options...
adrian Posted April 11, 2016 Share Posted April 11, 2016 Works great now - thanks! Sorry, I have to take that back. A hard reload still results in the FOUC. This however seems to work: $(document).ready(function(){perfmon.elements.main.show()}); Link to comment Share on other sites More sharing options...
Ben Posted April 12, 2016 Author Share Posted April 12, 2016 I took a conservative approach and added some stylesheet onload bookkeeping. I'm optimistic this will fix the flash of unstyled content once and for all. 3 Link to comment Share on other sites More sharing options...
adrian Posted April 14, 2016 Share Posted April 14, 2016 I took a conservative approach and added some stylesheet onload bookkeeping. I'm optimistic this will fix the flash of unstyled content once and for all. Looks good to me - thanks again! 1 Link to comment Share on other sites More sharing options...
Klenkes Posted October 30, 2016 Share Posted October 30, 2016 On PW 2.8.35 this error occurs:Fatal error: Access to undeclared static property: Wire::$allLocalHooks in ... site/modules/DebugPerfmon/DebugPerfmon.module on line 126 $local_hooks = wire('config')->version >= 3 ? wire('hooks')->getAllLocalHooks() : Wire::$allLocalHooks; which most likely results from the >= 3 and doesn't respect the 2.8 branch I changed it to 2.8 which solves my current problem Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now