#At bzr+ssh://bk-internal.mysql.com/bzrroot/mysql-falcon/
211 Hakan Kuecuekyilmaz 2008-06-30
Added Priority | Status | Count overview for Falcon Bug Statistic.
modified:
dbt2/weekly_dbt2_overview.sh
falcon_bug_statistic/falcon_bug_statistic.php
falcon_bug_statistic/falcon_bug_statistic_text.php
falcon_bug_statistic/include/config.inc.php
falcon_bug_statistic/include/fbs_query.php
per-file messages:
dbt2/weekly_dbt2_overview.sh
Which $HOST we are failing on?
falcon_bug_statistic/falcon_bug_statistic.php
Added Priority | Status | Count view.
falcon_bug_statistic/falcon_bug_statistic_text.php
Added Priority | Status | Count view.
falcon_bug_statistic/include/config.inc.php
Refactored status fields to query to be configurable.
falcon_bug_statistic/include/fbs_query.php
Added Priority | Status | Count query.
=== modified file 'dbt2/weekly_dbt2_overview.sh'
--- a/dbt2/weekly_dbt2_overview.sh 2008-06-17 07:49:19 +0000
+++ b/dbt2/weekly_dbt2_overview.sh 2008-06-30 08:51:27 +0000
@@ -218,8 +218,8 @@ start_mysqld()
sleep 3
k=$(($k + 1))
if [ $k -eq 120 ]; then
- echo "Could not start mysqld" >> $LOG
- echo "Could not start mysqld" | mail -s"WDO: error starting mysqld" $ADMIN
+ echo "[ERROR] Could not start mysqld" >> $LOG
+ echo "[ERROR] Could not start mysqld on $HOSTNAME" | mail -s"WDO: error starting mysqld on $HOSTNAME" $ADMIN
exit 1;
fi
$MYSQLADMIN -uroot ping
=== modified file 'falcon_bug_statistic/falcon_bug_statistic.php'
--- a/falcon_bug_statistic/falcon_bug_statistic.php 2008-06-25 13:57:59 +0000
+++ b/falcon_bug_statistic/falcon_bug_statistic.php 2008-06-30 08:51:27 +0000
@@ -36,7 +36,7 @@ require_once './include/fbs_query.php';
<div class="fbs">
<table style="width: 90%;">
<tr>
- <td style="border: none;">
+ <td style="border: none; vertical-align: top;">
<table>
<tr>
<td><h2>Priority</h2></td>
@@ -46,6 +46,7 @@ require_once './include/fbs_query.php';
$sum = 0;
while ($row = mysql_fetch_assoc($res_prio)) {
$sum += $row['count'];
+
echo '<tr>' . "\n";
echo ' <td>' . $row['priority'] . '</td>' . "\n";
echo ' <td>' . $row['count'] . '</td>' . "\n";
@@ -58,7 +59,7 @@ require_once './include/fbs_query.php';
?>
</table></td>
- <td style="border: none;">
+ <td style="border: none; vertical-align: top;">
<table>
<tr>
<td><h2>Status</h2></td>
@@ -68,6 +69,7 @@ require_once './include/fbs_query.php';
$sum = 0;
while ($row = mysql_fetch_assoc($res_stat)) {
$sum += $row['count'];
+
echo '<tr>' . "\n";
echo ' <td>' . $row['status'] . '</td>' . "\n";
echo ' <td>' . $row['count'] . '</td>' . "\n";
@@ -80,15 +82,36 @@ require_once './include/fbs_query.php';
?>
</table></td>
+
+ <td style="border: none; vertical-align: top;">
+ <table>
+ <tr>
+ <td><h2>Priority</h2></td>
+ <td><h2>Status</h2></td>
+ <td><h2>Count</h2></td>
+ </tr>
+ <?php
+ $sum = 0;
+ while ($row = mysql_fetch_assoc($res_prio_stat)) {
+ $sum += $row['count'];
+
+ echo '<tr>' . "\n";
+ echo ' <td>' . $row['priority'] . '</td>' . "\n";
+ echo ' <td>' . $row['status'] . '</td>' . "\n";
+ echo ' <td>' . $row['count'] . '</td>' . "\n";
+ echo '</tr>' . "\n";
+ }
+ echo '<tr>' . "\n";
+ echo ' <td><b>All</b></td>' . "\n";
+ echo ' <td> </td>' . "\n";
+ echo ' <td><b>' . $sum . '</b></td>' . "\n";
+ echo '</tr>' . "\n";
+
+ ?>
+ </table></td>
</tr>
</table>
</div>
</body>
</html>
-
-<?php
-/**
- * Text output.
- */
-?>
=== modified file 'falcon_bug_statistic/falcon_bug_statistic_text.php'
--- a/falcon_bug_statistic/falcon_bug_statistic_text.php 2008-06-25 13:57:59 +0000
+++ b/falcon_bug_statistic/falcon_bug_statistic_text.php 2008-06-30 08:51:27 +0000
@@ -9,44 +9,76 @@
require_once './include/config.inc.php';
require_once './include/fbs_query.php';
-$f = 15;
-$s = 6;
-$sv = 3;
-define('FIRST_COLUMN', '%-' . $f . 's');
-define('SECOND_COLUMN', '%-' . $s . 's');
-define('SECOND_COLUMN_VALUE', '%' . $sv . 'd');
-
-$horizontal_rule = str_repeat('-', $f) . '+' . str_repeat('-', $s) . "\n";
+$ch = 7;
+$ph = 9;
+$sh = 15;
+$cv = 3;
+
+define('C_HEADER', '%-' . $ch . 's');
+define('P_HEADER', '%-' . $ph . 's');
+define('S_HEADER', '%-' . $sh . 's');
+define('C_VALUE', '%' . $cv . 'd');
+
+$hr_pc = str_repeat('-', $ph) . '+' . str_repeat('-', $ch) . "\n";
+$hr_sc = str_repeat('-', $sh) . '+' . str_repeat('-', $ch) . "\n";
+$hr_psc = str_repeat('-', $ph) . '+' . str_repeat('-', $sh + 1) . '+' . str_repeat('-', $ch) . "\n";
/**
* Text output.
*/
-echo 'Report generated at: ' . THIS_DATE . "\n";
+echo 'Falcon Bug Statistic' . "\n";
+echo 'Generated at: ' . THIS_DATE . "\n";
echo "\n";
-echo $horizontal_rule;
-printf(FIRST_COLUMN . '| ' . SECOND_COLUMN . "\n", 'Priority', 'Count');
-echo $horizontal_rule;
+
+/**
+ * Priority | Count
+ */
+echo $hr_pc;
+printf(P_HEADER . '| ' . C_HEADER . "\n", 'Priority', 'Count');
+echo $hr_pc;
$sum = 0;
while ($row = mysql_fetch_assoc($res_prio)) {
$sum += $row['count'];
- printf(FIRST_COLUMN . '| ' . SECOND_COLUMN_VALUE . "\n", $row['priority'], $row['count']);
+ printf(P_HEADER . '| ' . C_VALUE . "\n", $row['priority'], $row['count']);
}
-echo $horizontal_rule;
-printf(FIRST_COLUMN . '| ' . SECOND_COLUMN_VALUE . "\n", 'All', $sum);
+echo $hr_pc;
+printf(P_HEADER . '| ' . C_VALUE . "\n", 'All', $sum);
echo "\n";
echo "\n";
-echo $horizontal_rule;
-printf(FIRST_COLUMN . '| ' . SECOND_COLUMN . "\n", 'Status', 'Count');
-echo $horizontal_rule;
+
+/**
+ * Status | Count
+ */
+echo $hr_sc;
+printf(S_HEADER . '| ' . C_HEADER . "\n", 'Status', 'Count');
+echo $hr_sc;
$sum = 0;
while ($row = mysql_fetch_assoc($res_stat)) {
$sum += $row['count'];
- printf(FIRST_COLUMN . '| ' . SECOND_COLUMN_VALUE . "\n", $row['status'], $row['count']);
+ printf(S_HEADER . '| ' . C_VALUE . "\n", $row['status'], $row['count']);
+}
+echo $hr_sc;
+printf(S_HEADER . '| ' . C_VALUE . "\n", 'All', $sum);
+
+echo "\n";
+echo "\n";
+
+/**
+ * Priority | Status | Count
+ */
+echo $hr_psc;
+printf(P_HEADER . '| ' . S_HEADER . '| ' . C_HEADER . "\n", 'Priority', 'Status', 'Count');
+echo $hr_psc;
+
+$sum = 0;
+while ($row = mysql_fetch_assoc($res_prio_stat)) {
+ $sum += $row['count'];
+ printf(P_HEADER . '| ' . S_HEADER . '| ' . C_VALUE . "\n", $row['priority'], $row['status'], $row['count']);
}
-echo $horizontal_rule;
-printf(FIRST_COLUMN . '| ' . SECOND_COLUMN_VALUE . "\n", 'All', $sum);
+echo $hr_psc;
+printf(P_HEADER . '| ' . S_HEADER . '| ' . C_VALUE . "\n", 'All', '', $sum);
?>
=== modified file 'falcon_bug_statistic/include/config.inc.php'
--- a/falcon_bug_statistic/include/config.inc.php 2008-06-25 13:57:59 +0000
+++ b/falcon_bug_statistic/include/config.inc.php 2008-06-30 08:51:27 +0000
@@ -20,6 +20,38 @@ define('DATABASE_PASS', '');
define('THIS_DATE', date("F jS, Y - H:i:s") . ' CET');
/**
+ * Status fields used in queries.
+ */
+$status_verified ="
+ 'In progress',
+ 'In review',
+ 'Patch approved',
+ 'Patch pending',
+ 'Patch queued',
+ 'Post-fix test fail',
+ 'QA testing',
+ 'QA review',
+ 'Verified'
+";
+
+$status_all ="
+ 'Analyzing',
+ 'Documenting',
+ 'In progress',
+ 'In review',
+ 'Need Doc Info',
+ 'Need Feedback',
+ 'Open',
+ 'Patch approved',
+ 'Patch pending',
+ 'Patch queued',
+ 'Post-fix test fail',
+ 'QA testing',
+ 'QA review',
+ 'Verified'
+";
+
+/**
* Array of email addresses who will get a report.
*/
$receiver[] = 'hakan@stripped';
=== modified file 'falcon_bug_statistic/include/fbs_query.php'
--- a/falcon_bug_statistic/include/fbs_query.php 2008-06-25 13:57:59 +0000
+++ b/falcon_bug_statistic/include/fbs_query.php 2008-06-30 08:51:27 +0000
@@ -42,43 +42,25 @@ mysql_select_db(DATABASE_NAME);
// Sample data.
$sql_prio = "SELECT priority, count(*) AS count FROM bugdb
- WHERE status IN (
- 'In progress',
- 'In review',
- 'Patch approved',
- 'Patch pending',
- 'Patch queued',
- 'Post-fix test fail',
- 'QA testing',
- 'QA review',
- 'Verified'
- )
+ WHERE status IN (" . $status_verified . ")
AND severity <> 4
AND bug_type = 'Server: Falcon'
GROUP BY priority";
$sql_stat = "SELECT status, count(*) AS count FROM bugdb
- WHERE status IN (
- 'Analyzing',
- 'Documenting',
- 'In progress',
- 'In review',
- 'Need Doc Info',
- 'Need Feedback',
- 'Open',
- 'Patch approved',
- 'Patch pending',
- 'Patch queued',
- 'Post-fix test fail',
- 'QA testing',
- 'QA review',
- 'Verified'
- )
+ WHERE status IN (". $status_all . ")
AND severity <> 4
AND bug_type = 'Server: Falcon'
GROUP BY status";
+$sql_prio_stat = "SELECT priority, status, count(*) AS count FROM bugdb
+ WHERE status IN (" . $status_all . ")
+ AND severity <> 4
+ AND bug_type = 'Server: Falcon'
+ GROUP BY priority, status";
+
$res_prio = mysql_query($sql_prio);
$res_stat = mysql_query($sql_stat);
+$res_prio_stat = mysql_query($sql_prio_stat);
?>
| Thread |
|---|
| • bzr commit into mysql-falcon branch (hakan:211) | Hakan Kuecuekyilmaz | 30 Jun |