Test NOALYSS"; /* * cherche pour fichier a include, s'il y en a alors les affiche * avec une description */ $scan=scandir('../scenario/'); $max=count($scan); echo ''; $get='test.php?'.http_build_query(array('script'=>"all", 'gDossier'=>$gDossierLogInput, 'description'=>"Tous les scripts")); echo ''; echo ''; echo ''; echo ''; for ($e=0; $e<$max; $e++) { if (is_file('../scenario/'.$scan[$e])&&strpos($scan[$e], '.php')==true) { $description=""; $a_description=file('../scenario/'.$scan[$e]); $max_description=count($a_description); for ($w=0; $w<$max_description; $w++) { if (strpos($a_description[$w], '@description:')==true) { $description=$a_description[$w]; $description=str_replace('//@description:', '', $description); } } $get='test.php?'.http_build_query(array('script'=>$scan[$e], 'gDossier'=>$gDossierLogInput, 'description'=>$description)); echo ''; echo ''; echo ''; echo ''; } } echo '
'; echo ''; echo "Tous "; echo ''; echo 'Tous les scripts
'; echo ''; echo $scan[$e]; echo ''; echo ''.$description.'
'; } else if ($script=='all') { $scan=scandir('../scenario/'); $maxscan=count($scan); echo ''; for ($e_scan=0; $e_scan<$maxscan; $e_scan++) { if (is_file('../scenario/'.$scan[$e_scan])&&strpos($scan[$e_scan], '.php')==true) { $description=""; $a_description=file('../scenario/'.$scan[$e_scan]); $max_description=count($a_description); for ($w=0; $w<$max_description; $w++) { if (strpos($a_description[$w], '@description:')==true) { $description=$a_description[$w]; $description=str_replace('//@description:', '', $description); } } $start_mem=memory_get_usage(); $start_time=microtime(true); $script=str_replace('../', '', $script); echo '

'.$script."

"; echo '

description = '.$description.'

'; include '../scenario/'.$scan[$e_scan]; echo ''; echo ''; $end_mem=memory_get_usage(); $end_time=microtime(true); echo "

start mem : ".$start_mem; echo '

'; echo "

end mem : ".$end_mem; echo '

'; echo "

Diff = ".($end_mem-$start_mem)." bytes "; echo "

Diff = ".(round(($end_mem-$start_mem)/1024, 2))." kbytes "; echo "

Diff = ".(round(($end_mem-$start_mem)/1024/1024, 2))." Mbytes "; echo '

'; echo "

Execution script ".$script." time = ".(round(($end_time-$start_time), 4))." secondes

"; } } } else { $start_mem=memory_get_usage(); $start_time=microtime(true); $script=str_replace('../', '', $script); $description=HtmlInput::default_value_get("description", "aucune description"); echo '

'.$script."

"; echo '

description = '.$description.'

'; include '../scenario/'.$script; $end_mem=memory_get_usage(); $end_time=microtime(true); echo "

start mem : ".$start_mem; echo '

'; echo "

end mem : ".$end_mem; echo '

'; echo "

Diff = ".($end_mem-$start_mem)." bytes "; echo "

Diff = ".(round(($end_mem-$start_mem)/1024, 2))." kbytes "; echo "

Diff = ".(round(($end_mem-$start_mem)/1024/1024, 2))." Mbytes "; echo '

'; echo "

Execution script ".$script." time = ".(round(($end_time-$start_time), 4))." secondes

"; }