Fix benchmark plugin test listing if not loaded before other plugins
This commit is contained in:
parent
4424c8272d
commit
331dc99086
1 changed files with 8 additions and 2 deletions
|
@ -95,7 +95,12 @@ class ActionsPlugin:
|
||||||
return " Done in %.3fs = %s (%.2fx)" % (taken, multipler_title, multipler)
|
return " Done in %.3fs = %s (%.2fx)" % (taken, multipler_title, multipler)
|
||||||
|
|
||||||
def getBenchmarkTests(self, online=False):
|
def getBenchmarkTests(self, online=False):
|
||||||
tests = [
|
if hasattr(super(), "getBenchmarkTests"):
|
||||||
|
tests = super().getBenchmarkTests(online)
|
||||||
|
else:
|
||||||
|
tests = []
|
||||||
|
|
||||||
|
tests.extend([
|
||||||
{"func": self.testHdPrivatekey, "num": 50, "time_standard": 0.57},
|
{"func": self.testHdPrivatekey, "num": 50, "time_standard": 0.57},
|
||||||
{"func": self.testSign, "num": 20, "time_standard": 0.46},
|
{"func": self.testSign, "num": 20, "time_standard": 0.46},
|
||||||
{"func": self.testVerify, "kwargs": {"lib_verify": "btctools"}, "num": 20, "time_standard": 0.38},
|
{"func": self.testVerify, "kwargs": {"lib_verify": "btctools"}, "num": 20, "time_standard": 0.38},
|
||||||
|
@ -121,7 +126,8 @@ class ActionsPlugin:
|
||||||
{"func": self.testCryptHashlib, "kwargs": {"hash_type": "sha3_512"}, "num": 10, "time_standard": 0.65},
|
{"func": self.testCryptHashlib, "kwargs": {"hash_type": "sha3_512"}, "num": 10, "time_standard": 0.65},
|
||||||
|
|
||||||
{"func": self.testRandom, "num": 100, "time_standard": 0.08},
|
{"func": self.testRandom, "num": 100, "time_standard": 0.08},
|
||||||
]
|
])
|
||||||
|
|
||||||
if online:
|
if online:
|
||||||
tests += [
|
tests += [
|
||||||
{"func": self.testHttps, "num": 1, "time_standard": 2.1}
|
{"func": self.testHttps, "num": 1, "time_standard": 2.1}
|
||||||
|
|
Loading…
Reference in a new issue