简体   繁体   English

在mod_perl下将NYTProf与Mason结合使用

[英]Using NYTProf with Mason under mod_perl

I'm trying to profile a web application written on top of HTML::Mason, I managed to set the profiler but it doesn't seem to pick-up the code inside the components. 我试图剖析在HTML :: Mason之上编写的Web应用程序,我设法设置了剖析器,但它似乎没有在组件内部拾取代码。 Is there a way to profile Mason applications using NYTProf? 有没有办法使用NYTProf来分析Mason应用程序?

I realize you're deploying this app under mod_perl, but one way to handle this would be to deploy under Plack and then use Plack::Middleware::Debug::Profiler::NYTProf . 我知道您是在mod_perl下部署此应用程序,但是处理此问题的一种方法是在Plack下部署,然后使用Plack :: Middleware :: Debug :: Profiler :: NYTProf I haven't done this for Mason apps, but it was almost trivial to get some CGI::Application code running under Plack. 对于Mason应用程序,我还没有做到这一点,但是让一些CGI :: Application代码在Plack下运行几乎是微不足道的。 Once you are able to deploy under Plack you get access to lots of great middleware components for debugging. 一旦能够在Plack下部署,就可以访问许多出色的中间件组件进行调试。 If you can do this with little or no changes to the app itself, you could still continue to deploy to production under mod_perl but use Plack in development for stuff like NYTProf. 如果您可以对应用程序本身进行很少或没有任何更改,就可以继续在mod_perl下部署到生产环境,但可以在开发中将Plack用于NYTProf之类的东西。

EDIT: I see now that I should have pointed you at Devel::NYTProf::Apache . 编辑:我现在看到我应该把您指向Devel :: NYTProf :: Apache

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM