diff --git a/www/common_lib.inc b/www/common_lib.inc index bffb735394..2342c82a3a 100644 --- a/www/common_lib.inc +++ b/www/common_lib.inc @@ -3331,7 +3331,6 @@ function PopulateTestInfo(&$test) 'tcpdump', 'timeline', 'trace', - 'tsview_id', 'url', 'video', 'web10', diff --git a/www/cron/apkUpdate.php b/www/cron/apkUpdate.php deleted file mode 100644 index 2ea8671b4c..0000000000 --- a/www/cron/apkUpdate.php +++ /dev/null @@ -1,148 +0,0 @@ - array()); -} -foreach ($packages as $package) { - UpdateApk($update_path, $package, $apk_data); -} -$apk_data['last_update'] = time(); -file_put_contents($data_file, json_encode($apk_data)); -chdir($old_dir); - -function UpdateApk($update_path, $package, &$apk_data) -{ - echo "Checking for update for $package...\n"; - if (!isset($apk_data['packages'][$package])) { - $apk_data['packages'][$package] = array('device_path' => '', 'size' => 0, 'date' => '', 'time' => '', 'md5' => ''); - } - $path = GetApkDevicePath($package); - if (isset($path)) { - if (GetApkFileInfo($path, $size, $date, $time)) { - if ( - $path != $apk_data['packages'][$package]['device_path'] || - $size != $apk_data['packages'][$package]['size'] || - $date != $apk_data['packages'][$package]['date'] || - $time != $apk_data['packages'][$package]['time'] - ) { - $temp_file = "$update_path/tmp.apk"; - echo "$package updated, downloading\n"; - $md5 = FetchDeviceApk($path, $temp_file, $size); - if (isset($md5)) { - $file_name = "$package.apk"; - $local_file = "$update_path/$file_name"; - if (is_file($local_file)) { - unlink($local_file); - } - if (rename($temp_file, $local_file)) { - chmod($local_file, 0666); - $apk_data['packages'][$package] = array( - 'device_path' => $path, - 'file_name' => $file_name, - 'size' => $size, - 'date' => $date, - 'time' => $time, - 'md5' => $md5 - ); - } - } - } else { - echo "$package not updated\n"; - } - } - } -} - -function GetApkDevicePath($package) -{ - $path = null; - exec("adb shell pm path $package", $output, $result); - if (!$result && isset($output) && is_array($output)) { - $last = end($output); - if (substr($last, 0, 8) == 'package:') { - $path = trim(substr($last, 8)); - echo "$package apk path is $path\n"; - } - } else { - echo "Error fetching path for $package\n"; - } - return $path; -} - -function GetApkFileInfo($path, &$size, &$date, &$time) -{ - $ok = false; - $command = "adb shell ls -l " . escapeshellarg($path); - echo "$command\n"; - exec($command, $output, $result); - if (!$result && isset($output) && is_array($output)) { - $last = end($output); - $parts = preg_split('/\s+/', $last); - if (count($parts) >= 8) { - $size = intval($parts[4]); - $date = trim($parts[5]); - $time = trim($parts[6]); - echo "Size: $size, Date: $date, Time: $time\n"; - if ($size > 0 && strlen($date) && strlen($time)) { - $ok = true; - } - } elseif (count($parts) >= 7) { - $size = intval($parts[3]); - $date = trim($parts[4]); - $time = trim($parts[5]); - echo "Size: $size, Date: $date, Time: $time\n"; - if ($size > 0 && strlen($date) && strlen($time)) { - $ok = true; - } - } - } else { - echo "Error listing APK info"; - } - return $ok; -} - -function FetchDeviceApk($path, $local_file, $size) -{ - $md5 = null; - if (is_file($local_file)) { - unlink($local_file); - } - if (!is_file($local_file)) { - $command = "adb pull " . escapeshellarg($path) . ' ' . escapeshellarg($local_file); - echo "$command\n"; - exec($command, $output, $result); - if (!$result && is_file($local_file)) { - $pulled_size = filesize($local_file); - if ($pulled_size == $size) { - $md5 = md5_file($local_file); - echo "Pulled $path to $local_file - md5: $md5\n"; - } else { - echo "Wrong file size downloading $path ($size) to $local_file ($pulled_size)\n"; - } - } else { - echo "Failed to pull $path to $local_file\n"; - } - } - return $md5; -} diff --git a/www/cron/hourly.php b/www/cron/hourly.php index dcda928ffe..52508aab56 100644 --- a/www/cron/hourly.php +++ b/www/cron/hourly.php @@ -29,7 +29,6 @@ PruneCruxCache(); PruneVideos(); -ApkUpdate(); Unlock($cron_lock); @@ -40,14 +39,6 @@ echo "Done\n"; -function ApkUpdate() -{ - if (GetSetting('apkPackages')) { - echo "Updating APKs from attached device...\n"; - include __DIR__ . '/apkUpdate.php'; - } -} - function PruneVideos() { // Delete any rendered videos that are older than a day (they will re-render automatically on access) diff --git a/www/lib/statsd-php/Domnikl/Statsd/Client.php b/www/lib/statsd-php/Domnikl/Statsd/Client.php deleted file mode 100644 index 37c518e030..0000000000 --- a/www/lib/statsd-php/Domnikl/Statsd/Client.php +++ /dev/null @@ -1,347 +0,0 @@ - - */ -class Client -{ - /** - * Connection object that messages get send to - * - * @var Connection - */ - protected $_connection; - - /** - * holds all the timings that have not yet been completed - * - * @var array - */ - protected $_timings = array(); - - /** - * holds all memory profiles like timings - * - * @var array - */ - protected $_memoryProfiles = array(); - - /** - * global key namespace - * - * @var string - */ - protected $_namespace = ''; - - /** - * stores the batch after batch processing was started - * - * @var array - */ - protected $_batch = array(); - - /** - * batch mode? - * - * @var boolean - */ - protected $_isBatch = false; - - /** - * inits the Client object - * - * @param Connection $connection - * @param string $namespace global key namespace - */ - public function __construct(Connection $connection, $namespace = '') - { - $this->_connection = $connection; - $this->_namespace = (string) $namespace; - } - - /** - * increments the key by 1 - * - * @param string $key - * @param int $sampleRate - * - * @return void - */ - public function increment($key, $sampleRate = 1) - { - $this->count($key, 1, $sampleRate); - } - - /** - * decrements the key by 1 - * - * @param string $key - * @param int $sampleRate - * - * @return void - */ - public function decrement($key, $sampleRate = 1) - { - $this->count($key, -1, $sampleRate); - } - /** - * sends a count to statsd - * - * @param string $key - * @param int $value - * @param int $sampleRate (optional) the default is 1 - * - * @return void - */ - public function count($key, $value, $sampleRate = 1) - { - $this->_send($key, (int) $value, 'c', $sampleRate); - } - - /** - * sends a timing to statsd (in ms) - * - * @param string $key - * @param int $value the timing in ms - * @param int $sampleRate the sample rate, if < 1, statsd will send an average timing - * - * @return void - */ - public function timing($key, $value, $sampleRate = 1) - { - $this->_send($key, (int) $value, 'ms', $sampleRate); - } - - /** - * starts the timing for a key - * - * @param string $key - * - * @return void - */ - public function startTiming($key) - { - $this->_timings[$key] = gettimeofday(true); - } - - /** - * ends the timing for a key and sends it to statsd - * - * @param string $key - * @param int $sampleRate (optional) - * - * @return void - */ - public function endTiming($key, $sampleRate = 1) - { - $end = gettimeofday(true); - - if (array_key_exists($key, $this->_timings)) { - $timing = ($end - $this->_timings[$key]) * 1000; - $this->timing($key, $timing, $sampleRate); - unset($this->_timings[$key]); - } - } - - /** - * start memory "profiling" - * - * @param string $key - * - * @return void - */ - public function startMemoryProfile($key) - { - $this->_memoryProfiles[$key] = memory_get_usage(); - } - - /** - * ends the memory profiling and sends the value to the server - * - * @param string $key - * @param int $sampleRate - * - * @return void - */ - public function endMemoryProfile($key, $sampleRate = 1) - { - $end = memory_get_usage(); - - if (array_key_exists($key, $this->_memoryProfiles)) { - $memory = ($end - $this->_memoryProfiles[$key]); - $this->memory($key, $memory, $sampleRate); - - unset($this->_memoryProfiles[$key]); - } - } - - /** - * report memory usage to statsd. if memory was not given report peak usage - * - * @param string $key - * @param int $memory - * @param int $sampleRate - * - * @return void - */ - public function memory($key, $memory = null, $sampleRate = 1) - { - if (null === $memory) { - $memory = memory_get_peak_usage(); - } - - $this->count($key, (int) $memory, $sampleRate); - } - - /** - * executes a Closure and records it's execution time and sends it to statsd - * returns the value the Closure returned - * - * @param string $key - * @param \Closure $_block - * @param int $sampleRate (optional) default = 1 - * - * @return mixed - */ - public function time($key, \Closure $_block, $sampleRate = 1) - { - $this->startTiming($key); - $return = $_block(); - $this->endTiming($key, $sampleRate); - - return $return; - } - - /** - * sends a gauge, an arbitrary value to StatsD - * - * @param string $key - * @param int $value - * - * @return void - */ - public function gauge($key, $value) - { - $this->_send($key, (int) $value, 'g', 1); - } - - /** - * sends a set member - * - * @param string $key - * @param int $value - * - * @return void - */ - public function set($key, $value) - { - $this->_send($key, $value, 's', 1); - } - - /** - * actually sends a message to to the daemon and returns the sent message - * - * @param string $key - * @param int $value - * @param string $type - * @param int $sampleRate - * - * @return void - */ - protected function _send($key, $value, $type, $sampleRate) - { - if (0 != strlen($this->_namespace)) { - $key = sprintf('%s.%s', $this->_namespace, $key); - } - - $message = sprintf("%s:%d|%s", $key, $value, $type); - $sampledData = ''; - - $sample = mt_rand() / mt_getrandmax(); - - if ($sample > $sampleRate) { - return; - } - - if ($sampleRate < 1 || $this->_connection->forceSampling()) { - $sampledData = sprintf('%s|@%s', $message, $sampleRate); - } else { - $sampledData = $message; - } - - if (!$this->_isBatch) { - $this->_connection->send($sampledData); - } else { - $this->_batch[] = $sampledData; - } - } - - /** - * changes the global key namespace - * - * @param string $namespace - * - * @return void - */ - public function setNamespace($namespace) - { - $this->_namespace = (string) $namespace; - } - - /** - * gets the global key namespace - * - * @return string - */ - public function getNamespace() - { - return $this->_namespace; - } - - /** - * is batch processing running? - * - * @return boolean - */ - public function isBatch() - { - return $this->_isBatch; - } - - /** - * start batch-send-recording - * - * @return void - */ - public function startBatch() - { - $this->_isBatch = true; - } - - /** - * ends batch-send-recording and sends the recorded messages to the connection - * - * @return void - */ - public function endBatch() - { - $this->_isBatch = false; - $this->_connection->send(join("\n", $this->_batch)); - $this->_batch = array(); - } - - /** - * stops batch-recording and resets the batch - * - * @return void - */ - public function cancelBatch() - { - $this->_isBatch = false; - $this->_batch = array(); - } -} diff --git a/www/lib/statsd-php/Domnikl/Statsd/Connection.php b/www/lib/statsd-php/Domnikl/Statsd/Connection.php deleted file mode 100644 index cd08230dde..0000000000 --- a/www/lib/statsd-php/Domnikl/Statsd/Connection.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ -interface Connection -{ - - /** - * sends a message to Statsd - * - * @param $message - * - * @return void - */ - public function send($message); - - /** - * is sampling forced? - * - * @return boolean - */ - public function forceSampling(); -} - \ No newline at end of file diff --git a/www/lib/statsd-php/Domnikl/Statsd/Connection/Blackhole.php b/www/lib/statsd-php/Domnikl/Statsd/Connection/Blackhole.php deleted file mode 100644 index 4f9e7b0b38..0000000000 --- a/www/lib/statsd-php/Domnikl/Statsd/Connection/Blackhole.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class Blackhole implements Connection -{ - /** - * Drops any incoming messages - * - * @param $message - * - * @return void - */ - public function send($message) - { - return false; - } - - /** - * is sampling forced? - * - * @return boolean - */ - public function forceSampling() - { - return false; - } -} diff --git a/www/lib/statsd-php/Domnikl/Statsd/Connection/Socket.php b/www/lib/statsd-php/Domnikl/Statsd/Connection/Socket.php deleted file mode 100644 index ced1efd6b4..0000000000 --- a/www/lib/statsd-php/Domnikl/Statsd/Connection/Socket.php +++ /dev/null @@ -1,150 +0,0 @@ - - */ -class Socket implements Connection -{ - /** - * host name - * - * @var string - */ - protected $_host; - - /** - * port number - * - * @var int - */ - protected $_port; - - /** - * Socket timeout - * - * @var int - */ - protected $_timeout; - - /** - * Persistent connection - * - * @var bool - */ - protected $_persistent = false; - - /** - * the used socket resource - * - * @var resource - */ - protected $_socket; - - /** - * is sampling allowed? - * - * @var bool - */ - protected $_forceSampling = false; - - /** - * instantiates the Connection object and a real connection to statsd - * - * @param string $host Statsd hostname - * @param int $port Statsd port - * @param int $timeout Connection timeout - * @param bool $persistent (default FALSE) Use persistent connection or not - */ - public function __construct($host = 'localhost', $port = 8125, $timeout = null, $persistent = false) - { - $this->_host = (string)$host; - $this->_port = (int)$port; - $this->_timeout = $timeout; - $this->_persistent = $persistent; - } - - /** - * connect to statsd service - */ - protected function connect() - { - $errno = null; - $errstr = null; - if ($this->_persistent) { - $this->_socket = pfsockopen(sprintf("udp://%s", $this->_host), $this->_port, $errno, $errstr, $this->_timeout); - } else { - $this->_socket = fsockopen(sprintf("udp://%s", $this->_host), $this->_port, $errno, $errstr, $this->_timeout); - } - } - - /** - * sends a message to the UDP socket - * - * @param $message - * - * @return void - */ - public function send($message) - { - if (!$this->_socket) { - $this->connect(); - } - if (0 != strlen($message) && $this->_socket) { - try { - // total suppression of errors - @fwrite($this->_socket, $message); - } catch (\Exception $e) { - // ignore it: stats logging failure shouldn't stop the whole app - } - } - } - - /** - * @return string - */ - public function getHost() - { - return $this->_host; - } - - - /** - * @return int - */ - public function getPort() - { - return $this->_port; - } - - /** - * @return int - */ - public function getTimeout() - { - return $this->_timeout; - } - - /** - * @return bool - */ - public function isPersistent() - { - return $this->_persistent; - } - - /** - * is sampling forced? - * - * @return boolean - */ - public function forceSampling() - { - return (bool)$this->_forceSampling; - } -} diff --git a/www/lib/statsd-php/LICENCE b/www/lib/statsd-php/LICENCE deleted file mode 100644 index b9a6bee21d..0000000000 --- a/www/lib/statsd-php/LICENCE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2013 Dominik Liebler - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/www/lib/statsd.inc.php b/www/lib/statsd.inc.php deleted file mode 100644 index 4d9ab3a024..0000000000 --- a/www/lib/statsd.inc.php +++ /dev/null @@ -1,72 +0,0 @@ - 0 && - $test['discard'] <= $runs) { - $runs -= $test['discard']; - } - - if ($runs) { - $pageData = loadAllPageData($testPath); - $medians = array(GetMedianRun($pageData, 0), GetMedianRun($pageData, 1)); - if (isset($pageData) && is_array($pageData)) { - foreach ($pageData as $run => &$pageRun) { - foreach ($pageRun as $cached => &$testData) { - if (GetSetting('statsdPattern') && !preg_match('/' . GetSetting('statsdPattern') . '/', $test['label'])) { - continue; - } - if (GetSetting('statsdMedianOnly') && !($medians[$cached] == $run)) { - continue; - } - $graphData = array(); - foreach ($testData as $metric => $value) { - if (is_float($value)) { - $value = intval($value); - } - - if (is_int($value) && $metric != 'result') { - $graphData[$metric] = $value; - } - } - StatsdPost($test['location'], $test['browser'], $test['label'], $cached, $graphData); - } - } - } - } -} - -function StatsdPost($location, $browser, $label, $cached, &$metrics) { - $connection = new \Domnikl\Statsd\Connection\Socket(GetSetting('statsdHost'), (GetSetting('statsdPort') ?: 8125)); - $statsd = new \Domnikl\Statsd\Client($connection, (GetSetting('statsdPrefix') ?: '')); - - $base_key = graphite_key($location, $browser, $label, $cached); - - foreach ($metrics as $metric => $value) { - $statsd->gauge($base_key . $metric, $value); - } -} - -function graphite_key($location, $browser, $label, $cached, $metric = '') { - if (GetSetting('statsdCleanPattern')) { - $label = preg_replace('/' . GetSetting('statsdPattern') . '/', '', $label); - } - $fvrv = $cached ? 'repeat' : 'first'; - $locationParts = explode('_', $location); - $location = $locationParts[0]; - return "{$location}.{$browser}.{$label}.{$fvrv}."; -} - -?> diff --git a/www/lib/tsview.inc.php b/www/lib/tsview.inc.php deleted file mode 100644 index 9fa14cbef6..0000000000 --- a/www/lib/tsview.inc.php +++ /dev/null @@ -1,149 +0,0 @@ - 0 && - $test['discard'] <= $runs) - $runs -= $test['discard']; - if ($runs) { - $pageData = loadAllPageData($testPath); - $metrics = array('availability' => 1); - $fv = array('availability' => array()); - if (!$test['fvonly']) - $rv = array('availability' => array()); - for ($run = 1; $run <= $runs; $run++) { - if (array_key_exists($run, $pageData)) { - - // collect the first-view data - if (array_key_exists(0, $pageData[$run]) && - array_key_exists('result', $pageData[$run][0]) && - ($pageData[$run][0]['result'] == 0 || - $pageData[$run][0]['result'] == 99999)) { - $fv['availability'][] = 1; - foreach ($pageData[$run][0] as $metric => $value) { - if(is_float($value)) - $value=intval($value); - if (is_int($value) && $metric != 'result') { - if (!array_key_exists($metric, $metrics)) - $metrics[$metric] = 1; - if (!array_key_exists($metric, $fv)) - $fv[$metric] = array(); - $fv[$metric][] = $value; - } - } - } else - $fv['availability'][] = 0; - - // collect the repeat view data - if (isset($rv)) { - if (array_key_exists(1, $pageData[$run]) && - array_key_exists('result', $pageData[$run][1]) && - ($pageData[$run][1]['result'] == 0 || - $pageData[$run][1]['result'] == 99999)) { - $rv['availability'][] = 1; - foreach ($pageData[$run][1] as $metric => $value) { - if(is_float($value)) - $value=intval($value); - if (is_int($value) && $metric != 'result') { - if (!array_key_exists($metric, $metrics)) - $metrics[$metric] = 1; - if (!array_key_exists($metric, $rv)) - $rv[$metric] = array(); - $rv[$metric][] = $value; - } - } - } else - $rv['availability'][] = 0; - } - } else { - $fv['availability'][] = 0; - if (isset($rv)) - $rv['availability'][] = 0; - } - } - - if (array_key_exists('tsview_configs', $test) ){ - $configs = explode(",",$test['tsview_configs']); - } else { - $configs = array(); - } - $results_host = $test['tsview_results_host']; - - $spof=""; - if ($test['label'] == 'SPOF'){ - $spof="-SPOF"; - } - $datasource="{$tsview_name}{$spof}"; - - TSViewCreate($server, $datasource, $metrics); - TSViewPost($id, $server, $datasource, $fv,$results_host); - if (isset($rv)){ - TSViewCreate($server, "{$datasource}-repeat-view", $metrics); - TSViewPost($id, $server, "{$datasource}-repeat-view", $rv,$results_host); - } - - } -} - -function TSViewCreate($server, $tsview_name, &$metrics) { - $needs_update = false; - if (!is_dir('./dat')) - mkdir('./dat', 0777, true); - $def = './dat/tsview-' . sha1($tsview_name) . '.json'; - $lock = Lock("TSView $tsview_name"); - if (isset($lock)) { - if (is_file($def)) - $current = json_decode(file_get_contents($def), true); - if (!isset($current) || !is_array($current)) - $current = array(); - foreach ($metrics as $metric => $x) { - if (!array_key_exists($metric, $current)) { - $needs_update = true; - $current[$metric] = 1; - } - } - if ($needs_update) { - $data = array('names' => array()); - foreach ($current as $metric => $x) - $data['names'][] = str_replace('.','_',$metric); - $body = json_encode($data); - if (http_put_raw("$server$tsview_name", $body)) - file_put_contents($def, json_encode($current)); - } - Unlock($lock); - } -} - -function TSViewPost($id, $server, $tsview_name, &$stats,$results_host) { - $result_url = "$results_host/results.php?test=$id"; - $data = array('recordTimestamp' => round(microtime(true) * 1000), - 'points' => array(), - 'pointsDataType' => 'INT64', - 'configPairs' => array()); - foreach ($stats as $metric => $values) { - $entry = array('name' => str_replace('.','_',$metric), 'data' => array()); - foreach ($values as $value) - $entry['data'][] = $value; - $data['points'][] = $entry; - } - - $pairs = array(); - $pairs['result_url'] = $result_url; - foreach($configs as $config){ - $pair = explode('>',$config); - $pairs[$pair[0]] = $pair[1]; - } - $data['configPairs'] = $pairs; - - $body = json_encode($data); - http_post_raw("$server$tsview_name", $body); -} -?> diff --git a/www/runtest.php b/www/runtest.php index 9847bf98df..ebeddb1ae1 100644 --- a/www/runtest.php +++ b/www/runtest.php @@ -421,18 +421,6 @@ $test['securityInsights'] = 1; } - if (array_key_exists('tsview_id', $_REQUEST)) { - $test['tsview_id'] = $_REQUEST['tsview_id']; - - $protocol = getUrlProtocol(); - $test['tsview_results_host'] = "{$protocol}://{$_SERVER['HTTP_HOST']}"; - - // tsview_configs format: KEY>VALUE,KEY>VALUE,...... - if (array_key_exists('tsview_configs', $_REQUEST)) { - $test['tsview_configs'] = $_REQUEST['tsview_configs']; - } - } - if (array_key_exists('affinity', $_REQUEST)) { $test['affinity'] = hexdec(substr(sha1($_REQUEST['affinity']), 0, 8)); } diff --git a/www/settings/settings.ini.sample b/www/settings/settings.ini.sample index ab30a9623a..0f65af5a93 100644 --- a/www/settings/settings.ini.sample +++ b/www/settings/settings.ini.sample @@ -193,28 +193,6 @@ maxNavigateCount=20 ;crux_api_key=xxxxx ;crux_agent_api_keys=xxxxx,yyyyyy,zzzzz - -;tsview time-series database -;tsviewdb=http:///src/v1/ - - -; Publish test results to a StatsD backend -; for trend visualization. -; -; statsdHost - StatsD hostname. -; statsdPort - StatsD port number (default: 8125). -; statsdPrefix - Graphite key prefix (default: ''). -; statsdPattern - Set to a valid regexp pattern to send only matching tests labels. -; statsdCleanPattern - Set to 1 to exclude pattern from label (default: 0). -; statsdMedianOnly - Set to 1 to send only median tests to StatsD. (default: 0). -; -;statsdHost=127.0.0.1 -;statsdPort=8125 -;statsdPrefix=webpagetest -;statsdPattern=^cron_ -;statsdCleanPattern=0 -;statsdMedianOnly=0 - ; Default URL to ping when the test is complete ;ping_back_url=http://pingbackurl.com diff --git a/www/work/postprocess.php b/www/work/postprocess.php index 863a1d05f8..0479300440 100644 --- a/www/work/postprocess.php +++ b/www/work/postprocess.php @@ -44,27 +44,6 @@ ArchiveTest($id); } - // post the test to tsview if requested - $tsviewdb = GetSetting('tsviewdb'); - if ( - array_key_exists('tsview_id', $testInfo) && - strlen($testInfo['tsview_id']) && - strlen($tsviewdb) && - is_file('./lib/tsview.inc.php') - ) { - require_once('./lib/tsview.inc.php'); - TSViewPostResult($testInfo, $id, $testPath, GetSetting('tsviewdb'), $testInfo['tsview_id']); - } - - // post the test to statsd if requested - if ( - GetSetting('statsdHost') && - is_file('./lib/statsd.inc.php') - ) { - require_once('./lib/statsd.inc.php'); - StatsdPostResult($testInfo, $testPath); - } - // send an email notification if necessary $notifyFrom = GetSetting('notifyFrom'); if ($notifyFrom && strlen($notifyFrom) && is_file("$testPath/testinfo.ini")) {