1
0
Fork 0

Added tasktime plotting

master
Mike Gerwitz 2013-08-28 13:56:10 -04:00
parent b0d1076a47
commit 36c56bdf97
3 changed files with 67 additions and 0 deletions

8
plot/tasktime 100644
View File

@ -0,0 +1,8 @@
set terminal png
set bars 4.0
set xlabel "Date"
set ylabel "Man Hours"
set grid y
set tics scale 0.0
plot "tasktime.dat" using 1:3:4:3:4:xtic(2) title 'Time Interval' with candlesticks, \
"tasktime.dat" using 1:5 title 'Mean' with lines

View File

@ -168,6 +168,7 @@
}} }}
\newwrite\@taskstats
\newcommand\projectsummary{{% \newcommand\projectsummary{{%
\section{Project Summary} \section{Project Summary}
\pnumoff \pnumoff
@ -179,6 +180,21 @@
\expandafter\@task@setregs@vari\@@range||% \expandafter\@task@setregs@vari\@@range||%
\par {\sc Confidence:} \the\@@hconf\%% \par {\sc Confidence:} \the\@@hconf\%%
\par {\sc Variability:} \the\@@hvari\%% \par {\sc Variability:} \the\@@hvari\%%
% calculate median
\newcount\@@med
\advance\@@med \value{taskamin}%
\advance\@@med \value{taskamax}%
\divide\@@med by 2\relax
% write task stats to file (can be used for reporting by building consecutive
% versions, concatenating the data, taking the last row for each date and
% plotting, for example)
\immediate\openout\@taskstats=taskstats.dat
\immediate\write\@taskstats{min max med cp vp}%
\immediate\write\@taskstats{%
\arabic{taskamin} \arabic{taskamax} \the\@@med
\space\the\@@hconf \space\the\@@hvari
}%
\immediate\closeout\@taskstats
% reset counters % reset counters
\setcounter{taskamin}{0}% \setcounter{taskamin}{0}%
\setcounter{taskamax}{0}% \setcounter{taskamax}{0}%

43
tools/gentasktime 100755
View File

@ -0,0 +1,43 @@
#!/bin/bash
src="${1?Missing source document}"
domake()
{
pdflatex -draftmode "$src" >&2
}
gendate()
{
echo -n "$( git log -n1 --pretty=format:%ai | cut -d' ' -f1 ) "
}
domake \
&& echo -n 'id ' \
&& head -n1 taskstats.dat \
&& \
(
gendate && tail -n1 taskstats.dat \
&& git log --first-parent --no-merges --pretty=format:'%ar %h' \
| awk '
BEGIN {
last=""
}
/days ago/{
if ( $1 == last ) next;
if ( $1 < last ) nextfile;
last = $1;
print $1, $NF;
}
' \
| while read n h; do
git checkout "$h" >&2 \
&& domake \
&& gendate \
&& tail -n1 taskstats.dat \
|| exit 1
done
) \
| tac \
| awk 'BEGIN{i=0}{i++; printf "%d ", i; print}'