Commit a4355ee7 authored by Didier Cadiou's avatar Didier Cadiou
Browse files

Split error coloumn in the final statisticals report to have errors and...

Split error coloumn in the final statisticals report to have errors and exceptions statistics in distinct columns$
parent 219a5f4c
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ sed 's/Execute /\n/g' | \
sed '1d' | \
awk -F';' '{pb=""} tolower($0)~/(error|exception)/ {pb=$3} {print $1";"$2";"pb";"$(NF-2)";"$(NF-1)}' | \
sed "s/^/$f;$d;/" | \
sed "s/\$/;;;;;;;/"  >> $CSV
sed "s/\$/;;;;;;;;/"  >> $CSV
echo >> $CSV
done

@@ -96,6 +96,7 @@ create table tasks(
	stopped text,
	duration text,
	failed text,
	has_exception text,
	has_error text);
.import $CSV tasks

@@ -150,14 +151,19 @@ update tasks
set failed = 1
where ligne5 like '%task failed:%';

-- has_exception
update tasks 
set has_exception = 0;
update tasks
set has_exception = 1
where ligne3 like '%Exception%';

-- has_error
update tasks 
set has_error = 0;
update tasks
set has_error = 1
where ligne3 like '%Exception%'
	or lower(ligne3) like '%error%';

where lower(ligne3) like '%error%';

.exit
eof
@@ -234,6 +240,7 @@ select t.date,
  e.composant, 
  e.name, 
  sum(failed) as nbre_failed,
  sum(has_exception) as nbre_exception,
  sum(has_error) as nbre_error,
  a.sur
from tasks t -- les taches
@@ -248,7 +255,7 @@ from tasks t -- les taches
    on a.classname = t.classname 
    and a.date = t.date
group by t.date, t.classname, e.composant, e.name
having nbre_failed + nbre_error > 0
having nbre_failed + nbre_exception + nbre_error > 0
;