from main import duplicate_count
from main import duplicate_count2


def test(benchmark):
    assert benchmark(duplicate_count, "abcdea") == 1


def test2(benchmark):
    assert benchmark(duplicate_count2, "abcdea") == 1


''''''''' 
---------------------------------------------------------------------------------- benchmark: 2 tests ---------------------------------------------------------------------------------
Name (time in us)        Min                Max              Mean            StdDev            Median               IQR            Outliers  OPS (Kops/s)            Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test                  1.4390 (1.0)      26.8600 (1.28)     1.5394 (1.0)      0.3990 (1.0)      1.5040 (1.0)      0.0350 (1.0)      921;6309      649.5876 (1.0)       88130           1
test2                 1.6430 (1.14)     21.0250 (1.0)      1.7457 (1.13)     0.4286 (1.07)     1.7060 (1.13)     0.0520 (1.49)    1917;6972      572.8414 (0.88)     173431           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean
============================================================================ 2 passed in 2.67 seconds ====================================================================
'''''

from main import duplicate_count
from main import duplicate_count2


def test(benchmark):
    assert benchmark(duplicate_count, "abcdea") == 1


def test2(benchmark):
    assert benchmark(duplicate_count2, "abcdea") == 1


''''''''' 
---------------------------------------------------------------------------------- benchmark: 2 tests ---------------------------------------------------------------------------------
Name (time in us)        Min                Max              Mean            StdDev            Median               IQR            Outliers  OPS (Kops/s)            Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test                  1.4390 (1.0)      26.8600 (1.28)     1.5394 (1.0)      0.3990 (1.0)      1.5040 (1.0)      0.0350 (1.0)      921;6309      649.5876 (1.0)       88130           1
test2                 1.6430 (1.14)     21.0250 (1.0)      1.7457 (1.13)     0.4286 (1.07)     1.7060 (1.13)     0.0520 (1.49)    1917;6972      572.8414 (0.88)     173431           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean
============================================================================ 2 passed in 2.67 seconds ====================================================================
'''''

---------------------------------------------------------------------------------- benchmark: 2 tests --------------------------------------------------------------------------------- Name (time in us)        Min                Max              Mean            StdDev            Median               IQR            Outliers  OPS (Kops/s)            Rounds  Iterations --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- test                  1.4390 (1.0)      26.8600 (1.28)     1.5394 (1.0)      0.3990 (1.0)      1.5040 (1.0)      0.0350 (1.0)      921;6309      649.5876 (1.0)       88130           1 test2                 1.6430 (1.14)     21.0250 (1.0)      1.7457 (1.13)     0.4286 (1.07)     1.7060 (1.13)     0.0520 (1.49)    1917;6972      572.8414 (0.88)     173431           1 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  Legend:   Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.   OPS: Operations Per Second, computed as 1 / Mean ============================================================================ 2 passed in 2.67 seconds ====================================================================