Skip to content

Commit

Permalink
more benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed Dec 17, 2018
1 parent 08a01a9 commit 01c3798
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion hyperv/tests/test_bench.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
# (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from copy import deepcopy

from datadog_checks.hyperv import HypervCheck


def test_run(benchmark, instance):
def test_cache(benchmark, instance):
instance = deepcopy(instance)
instance['cache_counter_instances'] = True
check = HypervCheck('hyperv', {}, {}, [instance])

# Run once to get any PDH setup out of the way.
check.check(instance)

benchmark(check.check, instance)


def test_no_cache(benchmark, instance):
instance = deepcopy(instance)
instance['cache_counter_instances'] = False
check = HypervCheck('hyperv', {}, {}, [instance])

# Run once to get any PDH setup out of the way.
Expand Down

0 comments on commit 01c3798

Please sign in to comment.