Pet attack speeds were standardised in Burning Crusade, so all pets in BC Classic should have a base attack speed of 2.0. But if you've added points to the Beast Mastery talent Serpent's Swiftness then their base attack speed will be faster: up to 1.67 if you've added 5 points (remember, lower attack speeds are faster!). Furthermore, if your pet has been taught the ability Cobra Reflexes then its attack speed will be faster again and can be as fast as 1.28 when this ability is combined with Serpent's Swiftness.
The following table shows your pet's attack speed, based on how many points of Serpent's Swiftness your hunter has, and whether your pet has been taught Cobra Reflexes:
|Attack Speed||Attack Speed w/|
I use the following macro, which you can either type into your chat window, or add to a macro button (hit ESC, then select 'Macros'):
/run mainSpeed, offSpeed = UnitAttackSpeed("target") print(format("%s: attack speed = %.2f", GetUnitName("target"), mainSpeed))
Then you simply target any creature of interest and use the macro.