function cachefGetFilename() { $fileName = Pfc_Config::storageDir() . '/' . ini_get('pfc.config_file'); return $fileName; }
static function profileDir() { return Pfc_Config::storageDir() . '/profile'; }
/** * Get a trace reader for the specific file. * * If the file has not been preprocessed yet this will be done first. * * @param string File to read * @param Cost format for the reader * @return Pfc_Reader Reader for $file */ public function getTraceReader($file, $costFormat) { $prepFile = Pfc_Config::storageDir() . $file . Pfc_Config::$preprocessedSuffix; try { $r = new Pfc_Reader($prepFile, $costFormat); } catch (Exception $e) { // Preprocessed file does not exist or other error } return $r; }
<?php require './config.php'; require_once 'convert.php'; $sclogDir = Pfc_Config::storageDir() . "/" . "sclog"; $dataFile = $_GET['dataFile']; $dataFile = str_replace('pfc.out', 'pfc.sclog', $dataFile); $realPaht = $sclogDir . "/" . $dataFile; $rawData = file_get_contents($realPaht); $barData = getResultData($rawData, 600); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link rel="stylesheet" type="text/css" href="styles/d3drawarea.css"> <script src="js/d3.v3.min.js"></script> </head> <body> <script type="text/javascript" charset="utf-8"> var margin = {top: 20, right: 20, bottom: 30, left: 50}, width = 800 - margin.left - margin.right, height = 8000 - margin.top - margin.bottom; var svg = d3.select("body").append("svg") .attr("class", "chart") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom) .append("g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")");