from __future__ import division, print_function, absolute_import

from .case import BenchmarkCase
from .decorators import calls, seconds, repeats

__all__ = ['BenchmarkCase', 'calls', 'seconds', 'repeats']

import sys
if sys.version_info.major == 3:
    _is_py3k = True
    _range = range
else:
    _is_py3k = False
    _range = xrange


def main(reporter=None):
    """
    Use it like this:
        if __name__ == '__main__':
            benchmarking.main()
    """

    if reporter is None:
        from .reporters import TextReporter, CsvReporter, CodeSpeedReporter, MultiReporter
        r1 = TextReporter(min_only=False)
        r2 = CodeSpeedReporter('http://localhost:8000', less_is_better=True,  project='Test Time Project',  commitid=123, environment='test')
        r3 = CodeSpeedReporter('http://localhost:8000', less_is_better=False, project='Test Speed Project', commitid=123, environment='test')
        r4 = CsvReporter()
        reporter = MultiReporter([r1, r2, r3, r4])

    from .runner import BenchmarkRunner
    runner = BenchmarkRunner(reporter=reporter)
    return runner.run()

@@ -617,155 +617,12 @@
 nly=
-False)%0A        r2 = CodeSpeedReporter('http://localhost:8000', less_is_better=True,  project='Test Time Project',  commitid=123, environment='test'
+True
 )%0A  
@@ -628,17 +628,17 @@
        r
-3
+2
  = CodeS
@@ -678,30 +678,8 @@
 00',
- less_is_better=False,
  pro
@@ -693,14 +693,8 @@
 est 
-Speed 
 Proj
@@ -698,16 +698,17 @@
 roject',
+ 
  commiti
@@ -743,17 +743,17 @@
        r
-4
+3
  = CsvRe
@@ -809,12 +809,8 @@
 , r3
-, r4
 %5D)%0A%0A

Change demo reporters.