1
0

decorate some methods with @profiler to debug slow startup

This commit is contained in:
SomberNight
2018-11-16 14:39:22 +01:00
parent 4d62963efe
commit eba97f74b4
2 changed files with 5 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ from .jsonrpc import VerifyingJSONRPCServer
from .version import ELECTRUM_VERSION
from .network import Network
from .util import (json_decode, DaemonThread, print_error, to_string,
create_and_start_event_loop)
create_and_start_event_loop, profiler)
from .wallet import Wallet, Abstract_Wallet
from .storage import WalletStorage
from .commands import known_commands, Commands
@@ -121,6 +121,7 @@ def get_rpc_credentials(config: SimpleConfig) -> Tuple[str, str]:
class Daemon(DaemonThread):
@profiler
def __init__(self, config: SimpleConfig, fd=None, *, listen_jsonrpc=True):
DaemonThread.__init__(self)
self.config = config