| OLD | NEW |
| 1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 except Exception, e: | 197 except Exception, e: |
| 198 print("UpdatePerfData exception: %s" % e) | 198 print("UpdatePerfData exception: %s" % e) |
| 199 pass # Just keep working. | 199 pass # Just keep working. |
| 200 with self.lock: | 200 with self.lock: |
| 201 perf_key = self.perfdata.GetKey(test) | 201 perf_key = self.perfdata.GetKey(test) |
| 202 compression.Send( | 202 compression.Send( |
| 203 [constants.INFORM_DURATION, perf_key, test.duration, | 203 [constants.INFORM_DURATION, perf_key, test.duration, |
| 204 self.context.arch, self.context.mode], | 204 self.context.arch, self.context.mode], |
| 205 self.local_socket) | 205 self.local_socket) |
| 206 self.indicator.AboutToRun(test) | 206 self.indicator.AboutToRun(test) |
| 207 if test.suite.HasUnexpectedOutput(test): | 207 has_unexpected_output = test.suite.HasUnexpectedOutput(test) |
| 208 if has_unexpected_output: |
| 208 self.failed.append(test) | 209 self.failed.append(test) |
| 209 if test.output.HasCrashed(): | 210 if test.output.HasCrashed(): |
| 210 self.crashed += 1 | 211 self.crashed += 1 |
| 211 else: | 212 else: |
| 212 self.succeeded += 1 | 213 self.succeeded += 1 |
| 213 self.remaining -= 1 | 214 self.remaining -= 1 |
| 214 self.indicator.HasRun(test) | 215 self.indicator.HasRun(test, has_unexpected_output) |
| 215 rec.Advance() | 216 rec.Advance() |
| 216 peer.runtime = time.time() - start_time | 217 peer.runtime = time.time() - start_time |
| 217 except KeyboardInterrupt: | 218 except KeyboardInterrupt: |
| 218 sock.close() | 219 sock.close() |
| 219 raise | 220 raise |
| 220 except Exception, e: | 221 except Exception, e: |
| 221 print("Got exception: %s" % e) | 222 print("Got exception: %s" % e) |
| 222 pass # Fall back to local execution. | 223 pass # Fall back to local execution. |
| 223 else: | 224 else: |
| 224 compression.Send([constants.UNRESPONSIVE_PEER, peer.address], | 225 compression.Send([constants.UNRESPONSIVE_PEER, peer.address], |
| (...skipping 19 matching lines...) Expand all Loading... |
| 244 total_work += p.assigned_work | 245 total_work += p.assigned_work |
| 245 for p in self.peers: | 246 for p in self.peers: |
| 246 p.assigned_work /= total_work | 247 p.assigned_work /= total_work |
| 247 p.runtime /= total_runtime | 248 p.runtime /= total_runtime |
| 248 perf_correction = p.assigned_work / p.runtime | 249 perf_correction = p.assigned_work / p.runtime |
| 249 old_perf = p.relative_performance | 250 old_perf = p.relative_performance |
| 250 p.relative_performance = (old_perf + perf_correction) / 2.0 | 251 p.relative_performance = (old_perf + perf_correction) / 2.0 |
| 251 compression.Send([constants.UPDATE_PERF, p.address, | 252 compression.Send([constants.UPDATE_PERF, p.address, |
| 252 p.relative_performance], | 253 p.relative_performance], |
| 253 self.local_socket) | 254 self.local_socket) |
| OLD | NEW |