Mercurial > hg > blitz_condensed
view src/org/dancres/blitz/entry/InstanceCheckpoint.java @ 33:0b9265358617
Added tag 2.1.1 for changeset a77f0a9ed93c
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Sat, 12 Jun 2010 10:52:10 +0100 |
parents | 3dc0c5604566 |
children |
line wrap: on
line source
package org.dancres.blitz.entry; import java.io.Serializable; import java.util.ArrayList; /** If logging of instance counts is enabled, at each checkpoint, we will lodge an instance of this class as a checkpoint contribution */ class InstanceCheckpoint implements Serializable { private ArrayList theCounts = new ArrayList(); private long theTime = System.currentTimeMillis(); void add(String aType, int aCount) { theCounts.add(new CountAction(aType, aCount)); } public String toString() { StringBuffer myBuffer = new StringBuffer(); for (int i = 0; i < theCounts.size(); i++) { CountAction myCount = (CountAction) theCounts.get(i); myBuffer.append(theTime + " :" + myCount.toString() + "\n"); } return myBuffer.toString(); } }