Fixed a mysql error when running mysql_connect() and subsequently mysql_stat() in some environments. Doing this the Drupal Way now, using "SHOW STATUS" query.
Fixed division by zero error when running performance statistics calculation before performance logging has been run.