Example #1
0
 public function get_pages_profiles($pages, $tslot, $filter_functions = null)
 {
     $ret = array();
     $daily_profile_dir = sprintf($this->server_cfg['daily_upload_directory'], $this->game_cfg['name']);
     $blob_dir = $this->server_cfg['blob_dir'];
     $profiles = array();
     foreach ($pages as $page) {
         // Find all aggregate profiles in dir  or previous timeslot dir and take the last
         $profile_list = glob("{$daily_profile_dir}/{$tslot}/{$blob_dir}/*{$page}.xhprof");
         if (empty($profile_list)) {
             error_log("no profile for {$page} in {$daily_profile_dir}/{$tslot}/{$blob_dir} \n");
             continue;
         }
         $profile = end($profile_list);
         $ret[$page] = get_direct_pie($profile, $filter_functions);
     }
     return $ret;
 }
Example #2
0
    </script>

  </head>

  <body>
	 <div id='back'> Back </div>
	 <div id='both'>
	<span id="pie-chart1" style="float:left;margin-top:50px;"></span>
	<span id="pie-chart2" style="float:left;margin-top:50px;"></span>
	</div>
<script>
/**
* Pie chart hack
*/
var pieData = <?php 
echo json_encode(get_direct_pie($_GET['file']));
?>
;

$(document).ready(function() {
	$('#back').button();
	$('#back').click(function() {
		window.history.back();
	});
var COLORS = ['#4572A7', '#AA4643', '#89A54E', '#80699B', '#3D96AE', '#DB843D', '#458B00', '#8B7355', '#EEB422', '#DC143C'];
function getPieChartsData() {
        var o = pieData;
        var dataArr = [];

        for(fn in o) {
            if(o.hasOwnProperty(fn)) {