monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] FPE (divide by zero?) with db info --full on new re


From: Jack Lloyd
Subject: Re: [Monotone-devel] FPE (divide by zero?) with db info --full on new repo
Date: Thu, 22 Oct 2009 15:28:56 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Oct 22, 2009 at 02:46:19PM -0400, Jack Lloyd wrote:
> Obvious guess: division by zero in computing the percentiles.
> some_timestamp / (# checkins - 1) or suchlike.

Proposed patch (simply disables --full output if only a single checkin
in the db, which seems reasonable to me since I can't imagine it would
be too informative even if it did work).

#
# old_revision [8701ff02a2d7e301426491ce9ff5d09bea088d7e]
#
# patch "database.cc"
#  from [8d092cff405c1f08af7289dccf224037ada9dd53]
#    to [b51fe7f321193a8438ad7c24d4eaca846df48b67]
#
============================================================
--- database.cc 8d092cff405c1f08af7289dccf224037ada9dd53
+++ database.cc b51fe7f321193a8438ad7c24d4eaca846df48b67
@@ -1191,6 +1191,9 @@ database::info(ostream & out, bool analy
 
   form = form % correct % equal % incorrect % root_anc % missing;
 
+  if(diffs.size() == 0) // no information to provide in this case
+    return;
+
   // sort, so that we can get percentile values
   sort(diffs.begin(), diffs.end());
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]