1 19 package gnu.trove.benchmark; 20 21 28 class Result { 29 long theirs; 30 long ours; 31 int iterations; 32 String description; 33 34 39 public long getTheirs() { 40 return this.theirs; 41 } 42 43 48 public void setTheirs(long argTheirs){ 49 this.theirs = argTheirs; 50 } 51 52 57 public long getOurs() { 58 return this.ours; 59 } 60 61 66 public void setOurs(long argOurs){ 67 this.ours = argOurs; 68 } 69 70 75 public long getTheirAvg() { 76 return theirs / iterations; 77 } 78 79 84 public long getOurAvg() { 85 return ours / iterations; 86 } 87 88 93 public int getIterations() { 94 return this.iterations; 95 } 96 97 102 public void setIterations(int argIterations){ 103 this.iterations = argIterations; 104 } 105 106 111 public String getDescription() { 112 return this.description; 113 } 114 115 120 public void setDescription(String argDescription){ 121 this.description = argDescription; 122 } 123 124 public String toString() { 125 StringBuffer b = new StringBuffer (); 126 b.append(getDescription() + "\n"); 127 b.append("Iterations: " + getIterations() + "\n"); 128 b.append("Their total (msec): " + getTheirs() + "\n"); 129 b.append("Our total (msec): " + getOurs() + "\n"); 130 b.append("Their average (msec): " + getTheirAvg() + "\n"); 131 b.append("Our average (msec): " + getOurAvg() + "\n"); 132 return b.toString(); 133 } 134 } 135 | Popular Tags |