Message ID | CAAXf6LWFMtmDpFvZODkd3N_Wsk-VwNP-QVkquRhn3B2aiOjCqg@mail.gmail.com |
---|---|
State | Not Applicable |
Headers | show |
Dear Thomas De Schampheleire, On Wed, 28 Aug 2013 09:42:45 +0200, Thomas De Schampheleire wrote: > > Sounds sane. How would you compute what the reference is? Look at the > > build results of the last 30 days (i.e the ones that appear on the > > plot) ? > > I was actually thinking of using the current calculated percentages. > So say on day 1 there are 100 builds, with 70 successful, and on day 2 > there have been 50 builds with 25 successful, then I would plot 70% > for the first day and 50% for the second. Ah right, makes sense. The percentages are in fact already shown in the table above. > Given the variation in the configurations that are being built, a > rising success line from one day to the next cannot be interpreted as > an absolute reduction of bugs (could have been 'chance' because the > bad configurations weren't built on the second day) but if you look at > the trend it should tell us something. Right. > Here is some untested code that I think should do the trick (I don't > have a PHP environment at hand here): Your patch is now live at http://autobuild.buildroot.org/stats.php and it seems to work. If you confirm, then I'll commit and push your patch, with you as the author. Thanks! Thomas
Hi Thomas, On Wed, Aug 28, 2013 at 9:48 AM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Dear Thomas De Schampheleire, > > On Wed, 28 Aug 2013 09:42:45 +0200, Thomas De Schampheleire wrote: > >> > Sounds sane. How would you compute what the reference is? Look at the >> > build results of the last 30 days (i.e the ones that appear on the >> > plot) ? >> >> I was actually thinking of using the current calculated percentages. >> So say on day 1 there are 100 builds, with 70 successful, and on day 2 >> there have been 50 builds with 25 successful, then I would plot 70% >> for the first day and 50% for the second. > > Ah right, makes sense. The percentages are in fact already shown in the > table above. > >> Given the variation in the configurations that are being built, a >> rising success line from one day to the next cannot be interpreted as >> an absolute reduction of bugs (could have been 'chance' because the >> bad configurations weren't built on the second day) but if you look at >> the trend it should tell us something. > > Right. > >> Here is some untested code that I think should do the trick (I don't >> have a PHP environment at hand here): > > Your patch is now live at http://autobuild.buildroot.org/stats.php and > it seems to work. If you confirm, then I'll commit and push your patch, > with you as the author. That looks good, yes, thanks for testing so quickly. One consideration: although the table doesn't have to be larger, the 30 days for the graph is somewhat limited. If we want to see a trend, then I think a few months can be more interesting. So what about changing the SQL query to, say, 180 days (6 months) ? Best regards, Thomas
diff --git a/web/graph.php b/web/graph.php index c37bc88..7ac37d8 100644 --- a/web/graph.php +++ b/web/graph.php @@ -26,18 +26,16 @@ $total_data = array(); while($current = mysql_fetch_object($ret)) { array_push($dates_data, $current->day); - array_push($success_data, $current->success); - array_push($failures_data, $current->failures); - array_push($timeouts_data, $current->timeouts); - array_push($total_data, $current->total); + array_push($success_data, $current->success * 100 / $current->total); + array_push($failures_data, $current->failures * 100 / $current->total); + array_push($timeouts_data, $current->timeouts * 100 / $current->total); } /* Add data in your dataset */ -$myData->addPoints($success_data, "success"); -$myData->addPoints($failures_data, "failure"); -$myData->addPoints($timeouts_data, "timeout"); -$myData->addPoints($total_data, "total"); -$myData->setAxisName(0,"Number of builds"); +$myData->addPoints($success_data, "success %"); +$myData->addPoints($failures_data, "failure %"); +$myData->addPoints($timeouts_data, "timeout %"); +$myData->setAxisName(0,"Percentage of builds"); $myData->addPoints($dates_data, "Labels"); $myData->setSerieDescription("Labels","Dates"); @@ -59,4 +57,4 @@ $myPicture->drawLegend(20,20,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZ $myPicture->drawLineChart(); $myPicture->Stroke();