diff --git a/benchmarks/basic_commands.py b/benchmarks/basic_commands.py
index dcd8b99f4b718f6f16a689c2eb54b9e58ebd1c97_YmVuY2htYXJrcy9iYXNpY19jb21tYW5kcy5weQ==..d2daf85f7de7710416a3e9766266e08b9616046f_YmVuY2htYXJrcy9iYXNpY19jb21tYW5kcy5weQ== 100644
--- a/benchmarks/basic_commands.py
+++ b/benchmarks/basic_commands.py
@@ -1,7 +1,5 @@
 import os
 import os.path
-import sys
-import subprocess
 import time
 import timeit
 
@@ -5,7 +3,7 @@
 import time
 import timeit
 
-from .utils import REPOS, REPOS_DIR
+from .utils import REPOS, BaseTrackTestSuite, BaseTimeTestSuite
 
 
 def median(lst):
@@ -15,27 +13,5 @@
     return sum(sorted(lst)[quotient - 1:quotient + 1]) / 2.
 
 
-class TestSuite(object):
-
-    params = [REPOS]
-    param_names = ["repo"]
-    timeout = 120
-
-    def setup(self, repo_name):
-        venv = os.path.abspath(os.path.join(os.path.dirname(sys.executable), ".."))
-        self.repo_name = repo_name
-        self.hgpath = os.path.join(venv, "bin", "hg")
-        self.repo_path = os.path.join(REPOS_DIR, self.repo_name)
-
-    def _execute(self, command, *args):
-        cmd = self._prepare_cmd(command, *args)
-        # Clean environ
-        os.environ = {}
-
-        timings = []
-
-        # Do a first measurement
-        first_measure = self._single_execute(cmd)
-
-        N = int(30 / first_measure)
+class TestSuite(BaseTrackTestSuite):
 
@@ -41,29 +17,5 @@
 
-        for i in range(N):
-            timings.append(self._single_execute(cmd))
-
-        return median(timings)
-
-    def _prepare_cmd(self, command, *args):
-        cmd = [
-                self.hgpath,
-                "--cwd", self.repo_path,
-                # Add an alias to bypass potential one
-                "--config", "alias.%s=%s" % (command, command),
-                command,
-        ] + list(args)
-
-        return cmd
-
-    def _single_execute(self, cmd):
-        try:
-            before = time.time()
-            subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-            after = time.time()
-            return after - before
-        except subprocess.CalledProcessError as e:
-            print("OUTPUT", e.output)
-            raise
+    timeout = 120
 
     def track_commit(self, repo_name):
         timings = []
@@ -92,10 +44,7 @@
         return median(timings)
 
 
-class TimeTestSuite(object):
-
-    params = [REPOS]
-    param_names = ["repo"]
+class TimeTestSuite(BaseTimeTestSuite):
 
     def __init__(self):
         super(TimeTestSuite, self).__init__()
@@ -103,34 +52,6 @@
         self.timer = timeit.default_timer
         self.goal_time = 10
 
-    def setup(self, repo_name):
-        venv = os.path.abspath(os.path.join(os.path.dirname(sys.executable), ".."))
-        self.repo_name = repo_name
-        self.hgpath = os.path.join(venv, "bin", "hg")
-        self.repo_path = os.path.join(REPOS_DIR, self.repo_name)
-
-    def _execute(self, command, *args):
-        cmd = self._prepare_cmd(command, *args)
-
-        try:
-            return self._single_execute(cmd)
-        except subprocess.CalledProcessError as error:
-            print("ERROR OUTPUT", error.output)
-            raise
-
-    def _prepare_cmd(self, command, *args):
-        cmd = [
-                self.hgpath,
-                "--cwd", self.repo_path,
-                "--traceback",
-                command,
-        ] + list(args)
-
-        return cmd
-
-    def _single_execute(self, cmd):
-        return subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-
     def time_emptystatus(self, *args, **kwargs):
         return self._execute("status")
 
@@ -173,7 +94,7 @@
         return time
 
 
-class LogTimeTestSuite(object):
+class LogTimeTestSuite(BaseTimeTestSuite):
 
     params = [REPOS, [10, 100, 1000, 10000]]
     param_names = ["repo", "changesets"]
@@ -185,34 +106,6 @@
         self.timer = timeit.default_timer
         self.goal_time = 10
 
-    def setup(self, repo_name, n):
-        venv = os.path.abspath(os.path.join(os.path.dirname(sys.executable), ".."))
-        self.repo_name = repo_name
-        self.hgpath = os.path.join(venv, "bin", "hg")
-        self.repo_path = os.path.join(REPOS_DIR, self.repo_name)
-
-    def _execute(self, command, *args):
-        cmd = self._prepare_cmd(command, *args)
-
-        try:
-            return self._single_execute(cmd)
-        except subprocess.CalledProcessError as error:
-            print("ERROR OUTPUT", error.output)
-            raise
-
-    def _prepare_cmd(self, command, *args):
-        cmd = [
-                self.hgpath,
-                "--cwd", self.repo_path,
-                "--traceback",
-                command,
-        ] + list(args)
-
-        return cmd
-
-    def _single_execute(self, cmd):
-        return subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-
     def time_log_history(self, repo, n):
         self._execute("log", "-r", "tip~%d::" % n)
 
@@ -216,7 +109,8 @@
     def time_log_history(self, repo, n):
         self._execute("log", "-r", "tip~%d::" % n)
 
-class UpdateTimeTestSuite(object):
+
+class UpdateTimeTestSuite(BaseTimeTestSuite):
 
     params = [REPOS, [10, 100, 1000, 10000]]
     param_names = ["repo", "changesets"]
@@ -228,35 +122,7 @@
         self.timer = timeit.default_timer
         self.goal_time = 10
 
-    def setup(self, repo_name, n):
-        venv = os.path.abspath(os.path.join(os.path.dirname(sys.executable), ".."))
-        self.repo_name = repo_name
-        self.hgpath = os.path.join(venv, "bin", "hg")
-        self.repo_path = os.path.join(REPOS_DIR, self.repo_name)
-
-    def _execute(self, command, *args):
-        cmd = self._prepare_cmd(command, *args)
-
-        try:
-            return self._single_execute(cmd)
-        except subprocess.CalledProcessError as error:
-            print("ERROR OUTPUT", error.output)
-            raise
-
-    def _prepare_cmd(self, command, *args):
-        cmd = [
-                self.hgpath,
-                "--cwd", self.repo_path,
-                "--traceback",
-                command,
-        ] + list(args)
-
-        return cmd
-
-    def _single_execute(self, cmd):
-        return subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-
     def time_up_tip(self, repo, n):
         self._execute("up", "-r", "tip~%d" % n)
         self._execute("up", "-r", "tip")
 
@@ -259,8 +125,9 @@
     def time_up_tip(self, repo, n):
         self._execute("up", "-r", "tip~%d" % n)
         self._execute("up", "-r", "tip")
 
-class BundleTimeTestSuite(object):
+
+class BundleTimeTestSuite(BaseTimeTestSuite):
 
     params = [REPOS, [10, 100, 1000, 10000]]
     param_names = ["repo", "changesets"]
@@ -272,33 +139,5 @@
         self.timer = timeit.default_timer
         self.goal_time = 10
 
-    def setup(self, repo_name, n):
-        venv = os.path.abspath(os.path.join(os.path.dirname(sys.executable), ".."))
-        self.repo_name = repo_name
-        self.hgpath = os.path.join(venv, "bin", "hg")
-        self.repo_path = os.path.join(REPOS_DIR, self.repo_name)
-
-    def _execute(self, command, *args):
-        cmd = self._prepare_cmd(command, *args)
-
-        try:
-            return self._single_execute(cmd)
-        except subprocess.CalledProcessError as error:
-            print("ERROR OUTPUT", error.output)
-            raise
-
-    def _prepare_cmd(self, command, *args):
-        cmd = [
-                self.hgpath,
-                "--cwd", self.repo_path,
-                "--traceback",
-                command,
-        ] + list(args)
-
-        return cmd
-
-    def _single_execute(self, cmd):
-        return subprocess.check_output(cmd, stderr=subprocess.STDOUT)
-
     def time_bundle(self, repo, n):
         self._execute("bundle", "--base", ":(-%d)" % (n+1), "/tmp/bundle.bundle")
diff --git a/benchmarks/utils.py b/benchmarks/utils.py
index dcd8b99f4b718f6f16a689c2eb54b9e58ebd1c97_YmVuY2htYXJrcy91dGlscy5weQ==..d2daf85f7de7710416a3e9766266e08b9616046f_YmVuY2htYXJrcy91dGlscy5weQ== 100644
--- a/benchmarks/utils.py
+++ b/benchmarks/utils.py
@@ -1,2 +1,3 @@
 import os
+import os.path
 import re
@@ -2,2 +3,3 @@
 import re
+import subprocess
 import sys
@@ -3,5 +5,5 @@
 import sys
-import subprocess
+import time
 from functools import wraps
 
 BASEDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
@@ -121,3 +123,86 @@
             return float(match.group(1))
         return perf
     return _bench_with_repo(repo_setup, **kwargs)
+
+
+###
+# Base classes for benchmarks
+###
+
+
+class BaseTestSuite(object):
+
+    params = [REPOS]
+    param_names = ["repo"]
+
+    def setup(self, repo_name, *args, **kwargs):
+        venv = os.path.abspath(os.path.join(os.path.dirname(sys.executable), ".."))
+        self.repo_name = repo_name
+        self.hgpath = os.path.join(venv, "bin", "hg")
+        self.repo_path = os.path.join(REPOS_DIR, self.repo_name)
+
+
+class BaseTrackTestSuite(BaseTestSuite):
+
+    def _execute(self, command, *args):
+        cmd = self._prepare_cmd(command, *args)
+        # Clean environ
+        os.environ = {}
+
+        timings = []
+
+        # Do a first measurement
+        first_measure = self._single_execute(cmd)
+
+        N = int(30 / first_measure)
+
+        for i in range(N):
+            timings.append(self._single_execute(cmd))
+
+        return median(timings)
+
+    def _prepare_cmd(self, command, *args):
+        cmd = [
+                self.hgpath,
+                "--cwd", self.repo_path,
+                # Add an alias to bypass potential one
+                "--config", "alias.%s=%s" % (command, command),
+                command,
+        ] + list(args)
+
+        return cmd
+
+    def _single_execute(self, cmd):
+        try:
+            before = time.time()
+            subprocess.check_output(cmd, stderr=subprocess.STDOUT)
+            after = time.time()
+            return after - before
+        except subprocess.CalledProcessError as e:
+            print("OUTPUT", e.output)
+            raise
+
+
+class BaseTimeTestSuite(BaseTestSuite):
+
+    def _execute(self, command, *args):
+        cmd = self._prepare_cmd(command, *args)
+
+        try:
+            return self._single_execute(cmd)
+        except subprocess.CalledProcessError as error:
+            print("ERROR OUTPUT", error.output)
+            raise
+
+    def _prepare_cmd(self, command, *args):
+        cmd = [
+                self.hgpath,
+                "--cwd", self.repo_path,
+                "--traceback",
+                command,
+        ] + list(args)
+
+        return cmd
+
+    def _single_execute(self, cmd):
+        return subprocess.check_output(cmd, stderr=subprocess.STDOUT)