Automatically detect perf regression by checking against perf expectations.

Adopt the idea of how currently Chrome team is detecting perf regression
(http://www.chromium.org/developers/tree-sheriffs/perf-sheriffs).

expectation_checker.py:
1. load expectation files
2. provide util functions that take one/multiple perf value(s), compare them against the expectations, and return comparison results(regress/improve/accept).
perf_expectations.json
Expectations are specified in this file.

TEST=None
BUG=None

Change-Id: If1867b60151e9472b6fead0472de1b7b4892f710
Reviewed-on: https://gerrit.chromium.org/gerrit/31521
Commit-Ready: Fang Deng <fdeng@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Tested-by: Fang Deng <fdeng@chromium.org>
diff --git a/client/common_lib/site_utils.py b/client/common_lib/site_utils.py
index 342f5ca..ec84577 100644
--- a/client/common_lib/site_utils.py
+++ b/client/common_lib/site_utils.py
@@ -1,6 +1,7 @@
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
+import re
 import socket
 
 from autotest_lib.client.common_lib import base_utils, global_config
@@ -48,3 +49,16 @@
         return True
     except socket.gaierror:
       return False
+
+
+def get_current_board():
+    """Return the current board name.
+
+    @return current board name, e.g "lumpy", None on fail.
+    """
+    with open('/etc/lsb-release') as lsb_release_file:
+        for line in lsb_release_file:
+            m = re.match(r'^CHROMEOS_RELEASE_BOARD=(.+)$', line)
+            if m:
+                return m.group(1)
+    return None