public function test_histogram_only_accepts_arrays()
 {
     try {
         histogram('passing a string');
     } catch (Exception $e) {
         return;
     }
     $this->fail('histogram() should only accept an array');
 }
Example #2
0
function histogram_2values($valuea, $valueb, $labela = "a", $labelb = "b", $mode = 1, $width = 200, $height = 30, $title = "", $ttl = 2)
{
    global $config;
    $data = array();
    $data[$labela] = $valuea;
    $data[$labelb] = $valueb;
    $data_json = json_encode($data);
    $max = max($valuea, $valueb);
    return histogram($data_json, $width, $height, $config['font'], $max, $title, $mode, $ttl);
}
Example #3
0
echo histogram($hCdf, "reqJS", "JS Requests per Page", "reqJS", 5) . "\n";
echo histogram($hCdf, "bytesJS", "JS Transfer Size per Page", "bytesJS", 100 * 1024, 2) . "\n";
echo histogram($hCdf, "reqCSS", "CSS Requests per Page", "reqCSS", 2) . "\n";
echo histogram($hCdf, "bytesCSS", "CSS Transfer Size per Page", "bytesCSS", 10 * 1024, 2) . "\n";
echo histogram($hCdf, "reqImg", "Img Requests per Page", "reqImg", 20) . "\n";
echo histogram($hCdf, "bytesImg", "Img Transfer Size per Page", "bytesImg", 400 * 1024, 2) . "\n";
echo histogram($hCdf, "reqGif", "GIF Requests per Page", "reqGif", 5) . "\n";
echo histogram($hCdf, "bytesGif", "GIF Transfer Size per Page", "bytesGif", 10 * 1024, 2) . "\n";
echo histogram($hCdf, "reqJpg", "JPG Requests per Page", "reqJpg", 10) . "\n";
echo histogram($hCdf, "bytesJpg", "JPG Transfer Size per Page", "bytesJpg", 200 * 1024, 2) . "\n";
echo histogram($hCdf, "reqPng", "PNG Requests per Page", "reqPng", 5) . "\n";
echo histogram($hCdf, "bytesPng", "PNG Transfer Size per Page", "bytesPng", 50 * 1024, 2) . "\n";
echo histogram($hCdf, "reqWebp", "Webp Requests per Page", "reqWebp", 5) . "\n";
echo histogram($hCdf, "bytesWebp", "Webp Transfer Size per Page", "bytesWebp", 5 * 1024, 2) . "\n";
echo histogram($hCdf, "reqFont", "Font Requests per Page", "reqFont", 2) . "\n";
echo histogram($hCdf, "bytesFont", "Font Transfer Size per Page", "bytesFont", 40 * 1024, 2) . "\n";
echo histogram($hCdf, "reqVideo", "Video Requests per Page", "reqVideo", 2) . "\n";
echo histogram($hCdf, "bytesVideo", "Video Transfer Size per Page", "bytesVideo", 50 * 1024) . "\n";
?>
</div>


<?php 
echo uiFooter();
?>

</body>

</html>

foreach ($Spread_interdependent as $key => $value) {
    $Spread_interdependent_percentage[$key] = $value / $Spread_interdependent_sum * 100;
}
$Degree_sensitivity = $Spread_interdependent['relationships'] + $Spread_interdependent['relationship_details'] + $Spread_interdependent['location'] + $Spread_interdependent['hometown'] + $Spread_interdependent['education_history'] + $Spread_interdependent['work_history'] + $Spread_interdependent['photos'] + $Spread_interdependent['videos'];
$Degree_sensitivity_percentage = $Degree_sensitivity / $Spread_interdependent_sum * 100;
$Degree_location = $Spread_interdependent['location'] + $Spread_interdependent['hometown'] + $Spread_interdependent['education_history'] + $Spread_interdependent['work_history'];
$Degree_location_percentage = $Degree_location / $Spread_interdependent_sum * 100;
echo "</BR></BR> A_j^Fu* statistics";
histogram($App_friends_values_sum_all);
echo "</BR></BR> A_j^Fu* percentage";
histogram($App_friends_values_percentage);
echo "</BR></BR> Degree of interedependent privacy";
histogram($degree_of_interdenpendency_values_sum_all);
echo "</BR></BR> Degree of interedependent privacy percentage";
histogram($degree_of_interdenpendency_values_percentage);
echo "</BR></BR> Degree of interedependent privacy attr";
histogram($Spread_interdependent);
echo "</BR></BR> Degree of interedependent privacy attr percentage";
histogram($Spread_interdependent_percentage);
echo "</BR></BR> Degree sensitive percentage: ";
print $Degree_sensitivity_percentage;
echo "</BR></BR> Degree location percentage: ";
print $Degree_location_percentage;
echo "</BR></BR> A_j^Fu* attributes";
histogram($Spread_A_F);
echo "</BR></BR> A_j^Fu* attributes percentage";
histogram($Spread_A_F_percentage);
echo "</BR></BR> A_j^Fu* sensitive percentage: ";
print $A_F_sensitivity_percentage;
echo "</BR></BR> A_j^Fu* location percentage: ";
print $A_F_location_percentage;