1#!/usr/bin/env python 2# Copyright 2017 the V8 project authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6""" 7Fake results processor for testing that just sums some things up. 8""" 9 10# for py2/py3 compatibility 11from __future__ import print_function 12 13import fileinput 14import re 15 16richards = 0.0 17deltablue = 0.0 18 19for line in fileinput.input(): 20 match = re.match(r'^Richards\d: (.*)$', line) 21 if match: 22 richards += float(match.group(1)) 23 match = re.match(r'^DeltaBlue\d: (.*)$', line) 24 if match: 25 deltablue += float(match.group(1)) 26 27print('Richards: %f' % richards) 28print('DeltaBlue: %f' % deltablue) 29