Esempio n. 1
0
    $test = $Tests[$k];
    echo '<li>';
    printf('%s<br/>', $test[TEST_TAG]);
    if (!empty($rows)) {
        foreach ($rows as $row) {
            if (is_array($row)) {
                $fc = number_format($row[DATA_FULLCPU], 2);
                if ($row[DATA_ELAPSED] > 0) {
                    $e = number_format($row[DATA_ELAPSED], 2);
                } else {
                    $e = '';
                }
                if ($row[DATA_STATUS] > PROGRAM_TIMEOUT) {
                    printf('%ss', $e);
                } else {
                    printf('%s', StatusMessage($row[DATA_STATUS]));
                }
                $lang = $row[DATA_LANG];
                $name = $Langs[$lang][LANG_FULL];
                $noSpaceName = str_replace(' ', '&nbsp;', $name);
                printf(' %s<br/>', $noSpaceName);
            } elseif (!isset($row)) {
                printf('%s<br/>', 'No&nbsp;program');
            }
        }
    } else {
        // empty($rows)
        printf('%s', 'No&nbsp;programs');
    }
    echo "</li>\n";
}
Esempio n. 2
0
                }
                $gz = $row[DATA_GZ];
                if ($row[DATA_ELAPSED] > 0) {
                    $e = number_format($row[DATA_ELAPSED], 2);
                } else {
                    $e = '';
                }
                $ld = CpuLoad($row);
                if (isset($mismatches[$k]) && $mismatches[$k]) {
                    $ld .= '&nbsp;&#8224;';
                    $hasMismatches = true;
                }
                if ($row[DATA_STATUS] > PROGRAM_TIMEOUT) {
                    printf('<td>%s</td><td %s>%s</td><td>%s</td><td>%d</td><td class="smaller">&nbsp;&nbsp;%s</td></tr>', $fc, $ELAPSED, $e, $kb, $gz, $ld);
                } else {
                    printf('<td colspan="2"><span class="message">%s</span></td><td colspan="2"></td><td></td></tr>', StatusMessage($row[DATA_STATUS]));
                }
                $ELAPSED = '';
            } elseif (!isset($row)) {
                printf('<td></td><td colspan="2"><span class="message">%s</span></td><td colspan="2"></td><td></td></tr>', 'No&nbsp;program');
            }
        }
    } else {
        // empty($rows)
        printf('<tr><th class="txt" colspan="3">&nbsp;<a name="%s" href="performance.php?test=%s" title="Measurements for all the %s benchmark programs">%s</a></th><th colspan="3"></th></tr>', $k, $k, $testname, $testname);
        printf('<tr><td>&nbsp;</td><td colspan="2"><span class="message">&nbsp;&nbsp;%s</span></td><td colspan="3"></td></tr>', 'No&nbsp;programs');
    }
}
?>

</table>
Esempio n. 3
0
        $id = $d[DATA_ID];
        $gz = $d[DATA_GZ];
        $fullcpu = $d[DATA_FULLCPU];
        $status = $d[DATA_STATUS];
        $e = ElapsedTime($d);
        if ($d[DATA_MEMORY] == 0) {
            $kb = '?';
        } else {
            $kb = number_format((double) $d[DATA_MEMORY]);
        }
        printf('<tr>');
        echo "\n";
        if ($status < 0) {
            printf('<td>&nbsp;</td><td><a href="program.php?test=%s&amp;lang=%s&amp;id=%d" title="Read the Program Source Code : %s">%s</a></td>', $SelectedTest, $k, $id, $TipName, $HtmlName);
            echo "\n";
            printf('<td>%s</td><td>&nbsp;</td><td>&nbsp;</td><td>%d</td>', StatusMessage($status), $gz);
        } else {
            printf('<td>%s</td><td><a href="program.php?test=%s&amp;lang=%s&amp;id=%d" title="Read the Program Source Code : %s">%s</a></td>', PFx($ratio), $SelectedTest, $k, $id, $TipName, $HtmlName);
            echo "\n";
            printf('<td>%0.2f</td><td>%0.2f</td><td>%s</td><td>%d</td><td></td>', $fullcpu, $e, $kb, $gz);
            echo "\n";
        }
        echo "</tr>\n";
    }
}
?>


<?php 
// MISSING PROGRAMS TABLE //////////////////////////
if (sizeof($No_Program_Langs) > 0) {
     if ($test != $prevTest || $id != $prevId) {
         $is_start = TRUE;
     } elseif (isset($prevStatus) && $prevStatus < 0) {
         continue;
     }
 }
 $prevTest = $test;
 $prevId = $id;
 $prevStatus = $status;
 if ($row[DATA_TESTVALUE] == 0) {
     $n = '?';
 } else {
     $n = '&nbsp;' . number_format($row[DATA_TESTVALUE]);
 }
 if ($status < 0) {
     $e = StatusMessage($row[DATA_STATUS]);
     $e_message = ' class="message"';
     $kb = '';
     $gz = '';
     $fc = '';
     $ld = '';
 } else {
     $e = ElapsedTime($row);
     $e_message = '';
     if ($row[DATA_MEMORY] == 0) {
         $kb = '?';
     } else {
         $kb = number_format((double) $row[DATA_MEMORY]);
     }
     $gz = $row[DATA_GZ];
     $fc = number_format($row[DATA_FULLCPU], 2);
    $fc = PTime($d[DATA_FULLCPU]);
    echo "        <td", $cpu_td, ">", $fc, "\n";
    $ld = CpuLoad($d);
    echo '        <td class="message">', $ld, "\n";
}
unset($better);
foreach ($Langs as $k => $v) {
    foreach ($Failed as $d) {
        if ($d[DATA_LANG] == $k) {
            echo "      <tr>\n";
            echo "        <td>\n";
            $id = $d[DATA_ID];
            $HtmlName = $Langs[$k][LANG_FULL] . IdName($d[DATA_ID]);
            $nav = '"./program.php?test=' . $SelectedTest . '&amp;lang=' . $k . '&amp;id=' . $id . '"';
            echo "        <td><a href={$nav}><span>", "{$HtmlName}</span></a>\n";
            $message = StatusMessage($d[DATA_STATUS]);
            $elapsed_message = '';
            $elapsed_td = '';
            $mem_message = '';
            $mem_td = '';
            $gzbytes_message = '';
            $gzbytes_td = '';
            $cpu_message = '';
            $cpu_td = '';
            $t_class = ' class="message"';
            if ($Sort == 'elapsed') {
                $elapsed_message = $message;
                $elapsed_td = $t_class;
            } elseif ($Sort == 'kb') {
                $mem_message = $message;
                $mem_td = $t_class;
Esempio n. 6
0
    $prevTest = $test;
    $prevId = $id;
    $prevStatus = $status;
    printf('<tr><td %s><a href="program.php?test=%s&amp;lang=%s&amp;id=%d" title="Read the Program Source Code : %s %s %s">%s&nbsp;%s</a></td>', $BAR, $test, $row[DATA_LANG], $id, $TestName, $LangName, IdName($id), $TestName, IdName($id));
    echo "\n";
    if ($row[DATA_TESTVALUE] == 0) {
        $n = '?';
    } else {
        $n = '&nbsp;' . number_format($row[DATA_TESTVALUE]);
    }
    if ($status < 0) {
        $kb = '&nbsp;';
        $fullcpu = '&nbsp;';
        $elapsed = '&nbsp;';
        $load = '&nbsp;';
        $fullcpu = StatusMessage($row[DATA_STATUS]);
    } else {
        if ($row[DATA_MEMORY] == 0) {
            $kb = '?';
        } else {
            if ($TestName == 'startup') {
                $kb = '&nbsp;';
            } else {
                $kb = number_format((double) $row[DATA_MEMORY]);
            }
        }
        $fullcpu = number_format($row[DATA_FULLCPU], 2);
        $elapsed = ElapsedTime($row);
    }
    printf('<td %s><span class="numN">%s</span></td><td %s>%s</td><td %s>%s</td><td %s>%s</td><td %s>%s</td></tr>', $BAR, $n, $BAR, $fullcpu, $BAR, $elapsed, $BAR, $kb, $BAR, $row[DATA_GZ]);
}
Esempio n. 7
0
                 echo "        <td", $elapsed_td, ">", $e, "\n";
                 if ($row[DATA_MEMORY] == 0) {
                     $kb = '?';
                 } else {
                     $kb = number_format($row[DATA_MEMORY]);
                 }
                 echo "        <td>", $kb, "\n";
                 $gz = $row[DATA_GZ];
                 echo "        <td>", $gz, "\n";
                 $fc = number_format($row[DATA_FULLCPU], 2);
                 echo "        <td>", $fc, "\n";
                 $ld = CpuLoad($row);
                 echo '        <td class="message">', $ld, "\n";
             } else {
                 echo "        <td>&nbsp;", "\n";
                 echo '        <td class="message">', StatusMessage($row[DATA_STATUS]), "\n";
                 echo '        <td colspan="4">', "\n";
             }
             $elapsed_td = '';
         } elseif (!isset($row)) {
             echo "      <tr>\n";
             echo "        <td>&nbsp;", "\n";
             echo '        <td class="message">', 'No&nbsp;program', "\n";
             echo '        <td class="message" colspan="4">', '<a href="./play.html">contribute your program</a>', "\n";
         }
     }
 } else {
     // empty($rows)
     echo "      <tbody>\n";
     echo "      <tr>\n";
     echo "        <th>", $testname, "\n";
echo EndTip();
?>

<?php 
echo SectionDivider();
?>

<a name="<?php 
echo $table_subsection_name;
?>
"></a>

<h3>Manage Reporting Categories</h3>

<?php 
echo StatusMessage($status_msg);
?>

<form action="<?php 
echo $_SERVER['PHP_SELF'];
?>
#<?php 
echo $table_subsection_name;
?>
" name="<?php 
echo $table_form_name;
?>
" method="POST">
<input type="hidden" name="action" value="">
<?php 
$table_buttons = '<input type="button" value="Rename" onclick="YAHOO.YPN.SiteReportingCategory.editCategory(' . $table_form_name . '); return false;" class="ypnTableButton" />' . '&nbsp;' . '<input type="button" value="Delete" onclick="YAHOO.YPN.SiteReportingCategory.deleteCategory(' . $table_form_name . '); return false;" class="ypnTableButton" />' . '&nbsp;&nbsp;&nbsp;' . '<input type="submit" name="activate" value="Mark as Active" class="ypnTableButton" />' . '&nbsp;' . '<input type="submit" name="deactivate" value="Mark as Inactive" class="ypnTableButton" />';