Review Board 2.0.15


stats: Fix some bugs in the python based stats system

Review Request #1676 - Created Jan. 28, 2013 and updated

Information
Andreas Hansson
gem5
default
Reviewers
Default
Changeset 9705:bfac87aa5771
---------------------------
stats: Fix some bugs in the python based stats system

This patch fixes assorted bugs in the python stats system. The following
bugs are addressed:

The text-based stats output now overwrites the output stats file if it
exists on the first stats dump. If it does not exist, it is
created. The file is appended to on subsequent stats dumps. This
mimics the operation of the C++ based stats system.

The total for a vector stat was not being calculated correctly as it
was calculating the sum of values including NaN and therefore any
vector which included a NaN summed to NaN. This operatino was not
desited as the old C++ based stats system ignored NaN values when
calculating the total.

The total function in info now checks to see if the stat is a scalar
or a vector, and returns the corresponding total.

Scalars and ScalarValues now have a length, mimicing the functionality
already found in Vector stats.

This patch also addresses a typo in the code for VectorDist, and a
typo in the definition of a Value.

   

Issue Summary

6 0 6 0
Review request changed
Updated (April 23, 2013, 8:20 p.m.)

Description:

~  

Changeset 9511:78b0e1c4da00

  ~

Changeset 9705:bfac87aa5771

   
   

stats: Fix some bugs in the python based stats system

   
   

This patch fixes assorted bugs in the python stats system. The following

    bugs are addressed:

   
   

The text-based stats output now overwrites the output stats file if it

    exists on the first stats dump. If it does not exist, it is
    created. The file is appended to on subsequent stats dumps. This
    mimics the operation of the C++ based stats system.

   
   

The total for a vector stat was not being calculated correctly as it

    was calculating the sum of values including NaN and therefore any
    vector which included a NaN summed to NaN. This operatino was not
    desited as the old C++ based stats system ignored NaN values when
    calculating the total.

   
   

The total function in info now checks to see if the stat is a scalar

    or a vector, and returns the corresponding total.

   
   

Scalars and ScalarValues now have a length, mimicing the functionality

    already found in Vector stats.

   
   

This patch also addresses a typo in the code for VectorDist, and a

    typo in the definition of a Value.

Diff:

Revision 2 (+38 -8)

Show changes

Ship it!
Posted (April 24, 2013, 2:26 p.m.)
Ship It!