VirtualBox

Changeset 65499 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 28, 2017 10:02:22 PM (8 years ago)
Author:
vboxsync
Message:

wuireport.py: try decimal point on success graph when going below 10%.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/webui/wuireport.py

    r65443 r65499  
    382382                            uPct = oRow.cHits * 100 / oRow.cTotal;
    383383                            aiValues.append(uPct);
    384                             asValues.append('%u%% (%u/%u)' % (uPct, oRow.cHits, oRow.cTotal));
     384                            if uPct >= 10:
     385                                asValues.append('%u%% (%u/%u)' % (uPct, oRow.cHits, oRow.cTotal));
     386                            else:
     387                                asValues.append('%.1f%% (%u/%u)' % (oRow.cHits * 100.0 / oRow.cTotal, oRow.cHits, oRow.cTotal));
    385388                        else:
    386389                            aiValues.append(0);
     
    395398                        uPct = oSet.dcHitsPerId[idKey] * 100 / oSet.dcTotalPerId[idKey];
    396399                        aiValues.append(uPct);
    397                         asValues.append('%u%% (%u/%u)' % (uPct, oSet.dcHitsPerId[idKey], oSet.dcTotalPerId[idKey]));
     400                        if uPct >= 10:
     401                            asValues.append('%u%% (%u/%u)' % (uPct, oSet.dcHitsPerId[idKey], oSet.dcTotalPerId[idKey]));
     402                        else:
     403                            asValues.append('%.1f%% (%u/%u)' % ( oSet.dcHitsPerId[idKey] * 100.0 / oSet.dcTotalPerId[idKey],
     404                                                                 oSet.dcHitsPerId[idKey], oSet.dcTotalPerId[idKey],));
    398405                    oTable.addRow('Totals', aiValues, asValues);
    399406
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette