Archive for the ‘Perl’ Category

Roll Your Own SiteScope, a Simple Alternative

Wednesday, April 23rd, 2008

In working with SiteScope of late, I've found that it doesn't always collect performance metrics the way I want to. More importantly, it can often turn a simple monitoring activity into a complex disaster. Take monitoring via JMX for example. In SiteScope, it has a rather complicated (and sometimes broken) ...

Speeding Up Script Development Time in LoadRunner

Tuesday, February 26th, 2008

If you've ever had to write lots of LoadRunner scripts you'll probably be interested in this snippet of code. Imagine you're in a situation where you need to produce many LoadRunner scripts each with multiple actions. Normally, once you've got all your custom correlations down pat (I hate correlation studio ...

[Bump] MyThree Bandwidth Usage Widget

Thursday, February 7th, 2008

Download it 'ere... I currently have a mobile broadband account (HSDPA) provided by three.com.au, and after a hexy surcharge from the previous month when exceeding my limit, thought it would be prudent to build a dashboard widget that tracks my monthly bandwidth usage. Building on a previous post that automates calls to ...

An exercise in correlation - playing MySpace music via iTunes

Thursday, February 7th, 2008

[UPDATE] Mr Gecko, has since implemented this logic and sorted out downloading woes (for u US folk) in a nifty little OSX app here ... In between contracts, I have been practicing the art of correlation by scraping data from public web sites. The legality of this is perhaps a little ...

Leopard Perl 5.8.8 installation throws errors when compiling (makefile)

Thursday, December 6th, 2007

If you're stuck with this error when trying to compile your own apps: No rule to make target `/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/config.h', needed by `Makefile'. You will probably find that your Leopard installation is lacking some necessary files. If you copy the files from your old(er) installation of perl (5.8.6) you should be able to ...

Win32::PerfMon is unable to enum objects with multiple instances

Friday, November 23rd, 2007

I've been looking for some easy ways to enumerate all of the available performance counters on a Win32 platform programatically. Rather than trawl through the PerfMon counter GUI, or regress back into the millions of raw counters available via WMI, I was looking for a solution somewhere in between. The ActiveState version ...

Automating your scripts with WWW::Mechanize

Monday, September 24th, 2007

CPAN provides a great module for Perl called WWW:Mechanize. To quote CPAN:WWW::Mechanize, or Mech for short, helps you automate interaction with a website. It supports performing a sequence of page fetches including following links and submitting forms. Each fetched page is parsed and its links and forms are extracted. A ...

Using perl to get, put and delete on Amazon S3 storage

Monday, August 6th, 2007

Amazon web services development domain have provided some neat perl code here such that you can simply put, get or delete objects inside an Amazon S3 storage bucket with something like this: ./s3curl.pl --id=[aws-access-key-id] --key=[aws-secret-access-key] -- http://s3.amazonaws.com/[bucket-name]/[key-name] I modified the author's code to make it a bit more win32 friendly, as ...

Using perl to read your win32 event log

Monday, August 6th, 2007

I often use a combination of cygwin with ssh to remotely manage windows servers, as I find this to be a quicker (and hopefully safer) method of access to my windows boxes. To that end, I often need to check windows application event logs. Typically you'd use the mmc, but ...

The gambler’s fallacy killed by pure maths

Tuesday, June 12th, 2007

Statistics (and the ability to gather/present) are an essential tool for performance testing. At the time of learning basic stats in high school and university I was plagued with the problem of not seeing the real life application of these tools. Sure, exercises and scenarios conducted simulated real life, but ...

Don’t forget Perl one liners

Friday, May 18th, 2007

If you have the requirement to manipulate multitudes of input messages / log files / data templates with dynamic variables, you may be left wondering what is the best approach. One could argue in a friendly way for hours about which language is the best to achieve this outcome (almost ...

No Load Runner? No problems!

Monday, January 15th, 2007

Often you will find yourself just out of reach of some load test tools like LoadRunner, but don't let that stop you generating load for your web apps. With enough patience and some careful use of live http headers you can achieve the same effect, albeit in a manually defined ...

A Perl of an idea for try … catch clauses

Wednesday, January 3rd, 2007

The try...catch...finally clause found in languages like Java are very handy for error handling. In scripting languages like Perl you can achieve the same effect using the eval function as the following code snippet demonstrates. eval{ &yourSubRoutine($parameters); }; $@ ? $yourLogObject->yourErrorMethod("I failed with reason: $@") ): ...