Skip to content
Snippets Groups Projects
Commit 83bac96a authored by llaffont's avatar llaffont
Browse files

Ajout script pour monitorer performances recherche

parent a462178b
No related merge requests found
......@@ -4928,6 +4928,7 @@ scripts/insert_licence.sh -text
scripts/iosrd.sh -text
scripts/marker-visit.el -text
scripts/md5base64.pl -text
scripts/monitor_recherche.php -text
scripts/opac2.sql -text
scripts/opac3.el -text
scripts/org-link-minor-mode.el -text
......
<?php
error_reporting(E_ALL^E_DEPRECATED);
function new_recherche($expression_recherchee){
$cookie_file = tempnam("/tmp", "cookie");
$url_recherche = "http://opacce.pergame.net/opacce.pergame.net/recherche/simple/expressionRecherche/";
$curl_old_step_1 = curl_init($url_recherche.$expression_recherchee);
curl_setopt($curl_old_step_1,CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($curl_old_step_1,CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($curl_old_step_1,CURLOPT_RETURNTRANSFER, true);
$result_old_step_1 = curl_exec($curl_old_step_1);
$total_time = curl_getinfo($curl_old_step_1,CURLINFO_TOTAL_TIME );
curl_close($curl_old_step_1);
if (false == strpos($result_old_step_1, 'Recherche: '.$expression_recherchee)) {
echo "Error\n";
}
echo date("H:i:s")." : $total_time s\n";
return $total_time;
}
// main
while(true) {
new_recherche('sport');
sleep(5);
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment