function oneRun($rc, $sTotal, $sInternal) { $my_pid = getmypid(); $ps = `ps -orss -p{$my_pid}`; list($junk, $psBefore) = explode("\n", $ps, 2); initClient($rc); $eTotal = memory_get_usage(true); $eInternal = memory_get_usage(false); $diffTotal = $eTotal - $sTotal; $diffInternal = $eInternal - $sInternal; $ps = `ps -orss -p{$my_pid}`; list($junk, $psAfter) = explode("\n", $ps, 2); $psBefore = trim($psBefore); $psAfter = trim($psAfter); $diffPS = $psAfter - $psBefore; # print "$rc: Start (int/total) = $sInternal/$sTotal End = $eInternal/$eTotal ps = $psBefore/$psAfter"; # print " Diff = $diffInternal/$diffTotal/$diffPS\n"; return $psAfter; }
<link type='text/css' rel='stylesheet' href='style.css'> <link rel='stylesheet' type='text/css' href='calendrierBleu.css' > <?php require_once 'NAApiClient.php'; require_once 'Config.php'; require_once 'initClient.php'; require_once 'menus.php'; require_once 'translate.php'; session_start(); date_default_timezone_set($timezone); if (!isset($_POST) && !isset($_GET)) { echo " No POST or GET"; return; } initClient(); $client = $_SESSION['client']; $Temperature_unit = $_SESSION['Temperature_unit']; $cu = $Temperature_unit ? '°' : ' F'; if (isset($_POST['station'])) { $stationId = $_POST['station']; } else { if (isset($_POST['selectStation'])) { $stationId = $_POST['selectStation']; } else { if (isset($_SESSION['stationId'])) { $stationId = $_SESSION['stationId']; } } } $_SESSION['stationId'] = $stationId;