List:Commits« Previous MessageNext Message »
From:Hakan Kuecuekyilmaz Date:September 16 2008 4:57pm
Subject:bzr commit into mysql-falcon branch (hky:270)
View as plain text  
#At bzr+ssh://bk-internal.mysql.com/bzrroot/mysql-falcon/

  270 Hakan Kuecuekyilmaz	2008-09-16
      Added hostname into title tag.
      Added plain text output for easier c&p.
modified:
  dbt2/weekly_dbt2_overview.php

=== modified file 'dbt2/weekly_dbt2_overview.php'
--- a/dbt2/weekly_dbt2_overview.php	2008-09-14 06:45:50 +0000
+++ b/dbt2/weekly_dbt2_overview.php	2008-09-16 16:57:02 +0000
@@ -27,6 +27,10 @@ define('BZR_VERSION', './bzr_version.txt
 define('DBT2_CONFIG', './dbt2_config.txt');
 define('MACHINE_INFO', './machine_info.txt');
 
+// Determine machine name from URL.
+$tmp = explode('/', $_SERVER['PHP_SELF']);
+$hostname = $tmp[2];
+
 $numbers_missing = 0;
 foreach ($directories as $data) {
     $numbers[$data] = sample_dbt2_data(DBT2_LOG_DIR . "/$data");
@@ -307,14 +311,16 @@ foreach ($directories as $data) {
 if (DEBUG) {
     echo '<pre>' . "\n";
     var_dump($falcon);
+    echo '</pre>' . "\n";
     echo '<br />' . "\n";
 
+    echo '<pre>' . "\n";
     var_dump($innodb);
+    echo '</pre>' . "\n";
     echo '<br />' . "\n";
 
+    echo '<pre>' . "\n";
     var_dump($per_cent);
-    echo '<br />' . "\n";
-
     echo '</pre>' . "\n";
     echo '<br />' . "\n";
 }
@@ -323,7 +329,7 @@ if (DEBUG) {
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
-        <title>Weekly DBT2 Overview</title>
+        <title><?php echo $hostname . ':';  ?> Weekly DBT2 Overview</title>
         <link href="./dbt2.css" rel="stylesheet" type="text/css" />
     </head>
 <body>
@@ -344,6 +350,8 @@ if (DEBUG) {
         100 warehouses</a>
     <a href="#configuration">
         Configuration</a>
+    <a href="#plain_text">
+        Plain text</a>
     <a href="#links">
         Links to old runs</a>
 </div>
@@ -526,6 +534,38 @@ if (file_exists(DBT2_CONFIG)) {
 ?>
 </div>
 
+<a name="plain_text"></a>
+<div class="dbt2">
+<?php
+$lenght = strlen($hostname) + 8;
+
+echo '<pre>' . "\n";
+echo str_repeat('*', $lenght) ."\n";
+echo '*** ' . $hostname . ' ***' . "\n";
+echo str_repeat('*', $lenght) ."\n";
+
+foreach ($directories as $data) {
+    echo '-' . $data . "\n";
+
+    echo '      ';
+    $columns = count($falcon_keys[$data]);
+    for ($i = 0; $i < $columns; $i++) {
+        printf('-c%-7s', (int) str_replace('FALCON_', '', $falcon_keys[$data][$i]));
+    }
+    echo "\n";
+
+    echo 'F/I   ';
+    foreach ($per_cent[$data] as $value) {
+        printf('%6.2f%%  ', $value);
+    }
+    echo "\n";
+
+    echo "\n";
+}
+echo '</pre>' . "\n";
+?>
+</div>
+
 <a name="links"></a>
 <div class="dbt2">
 <?php

Thread
bzr commit into mysql-falcon branch (hky:270) Hakan Kuecuekyilmaz16 Sep