Is there an alternative to Perl for YSlow?

I would like to have a tool in Perl to collect useful statistics for loading pages (e.g. load time / speed, CDN info, headers, dns lookup, compression)

Does anyone know if it exists or is there a place to learn how to create it?

+4
source share
2 answers

You might want to try WWW :: Mechanize :: Timed , which extends WWW :: Mechanize . Functions :: Timed will allow you to collect information about how long your request lasts. The main module :: Mechanize, which itself is a subclass of LWP :: UserAgent, will give you access to your answer, including headers, body content and images. From them you can calculate the total page "weight", the number of requests, etc. This does not apply to everything YSlow does (exposing the internal DNS DNS elements underlying gethostbyname would be a good trick!), But I hope this is the place to start if I understand your question correctly.

+1
source

You can use Perl CGI (or any perl program) several times under the profiler and check for similarities. I have not seen a web interface like this, but if you have control over the perl side of things, the documentation is here:

http://www.perl.com/pub/a/2004/06/25/profiling.html

It basically boils down to running your perl program with -d: DProf, and then, after it finishes, running dprofpp in the same directory:

# perl -d:DProf ./foo.pl # dprofpp 

Update:

Yes, this is not the same as protocol profiling, as described below, but there are no alternatives to perl. If you are trying to find where the perl slice is located, perl profiling is a good place to start. Products like YSlow will keep track of the clean aspects of the protocol, be it CGI perl or php or python.

Personally, I use it to profile my django site, which is in python and flash, and I profile them separately from the protocol part of the system in which I also use YSlow for.

In addition, there are perl plugins for "ddd" that will at least make it graphical:

http://www.gnu.org/software/ddd/

Sorry if this does not solve the exact problem, I would like to know if there is a perl interface to map it, but I know that this is where I will start looking ...

0
source

Source: https://habr.com/ru/post/1314672/


All Articles