From: Joe Presbrey
Date: Thu, 24 May 2007 23:29:56 +0000 (+0000)
Subject: show service stats on index
X-Git-Url: http://andersk.mit.edu/gitweb/sql-web.git/commitdiff_plain/396061c063bb07ee4e0c0e85b9c158c881039288
show service stats on index
git-svn-id: svn://presbrey.mit.edu/sql/web/dev@134 a142d4bd-2cfb-0310-9673-cb33a7e74f58
---
diff --git a/tpl/index.php b/tpl/index.php
index 56e4e82..26ce4e8 100644
--- a/tpl/index.php
+++ b/tpl/index.php
@@ -21,6 +21,35 @@ However, the SIPB MySQL service should not be used to host critical applications
One nightly backup is available for your locker at /mit/sql/backup/LOCKER_NAME
. You should perform additional backups of your data using the shortjobs service or phpMyAdmin.
+
+1) {
+ array_shift($qunits);
+ $v /= 1000;
+}
+printf('sql.mit.edu has served %.3f%s queries', $v, array_shift($qunits));
+
+$qunits = array('minutes', 'hours', 'days');
+$qdiv = array(60, 60, 24);
+while (count($qdiv) && $t/$qdiv[0]>0) {
+ $t /= array_shift($qdiv);
+ $tunits = array_shift($qunits);
+}
+printf(' in the last %.2f %s (%.2f qps)', $t, $tunits, $qavg);
+?>
+
+