pub(super) fn estimate(&self, reactor: &Reactor) {
        let timer = self.mem_estimator_runtime_s.start_timer();

        let metrics = reactor.metrics.estimate_heap_size() as i64;
        let net = reactor.small_network.estimate_heap_size() as i64;
        let address_gossiper = reactor.address_gossiper.estimate_heap_size() as i64;
        let storage = reactor.storage.estimate_heap_size() as i64;
        let contract_runtime = reactor.contract_runtime.estimate_heap_size() as i64;
        let rpc_server = reactor.rpc_server.estimate_heap_size() as i64;
        let rest_server = reactor.rest_server.estimate_heap_size() as i64;
        let event_stream_server = reactor.event_stream_server.estimate_heap_size() as i64;
        let chainspec_loader = reactor.chainspec_loader.estimate_heap_size() as i64;
        let consensus = reactor.consensus.estimate_heap_size() as i64;
        let deploy_fetcher = reactor.deploy_fetcher.estimate_heap_size() as i64;
        let deploy_gossiper = reactor.deploy_gossiper.estimate_heap_size() as i64;
        let block_proposer = reactor.block_proposer.estimate_heap_size() as i64;
        let block_validator = reactor.block_validator.estimate_heap_size() as i64;
        let linear_chain = reactor.linear_chain.estimate_heap_size() as i64;

        let total = metrics
            + net
            + address_gossiper
            + storage
            + contract_runtime
            + rpc_server
            + rest_server
            + event_stream_server
            + chainspec_loader
            + consensus
            + deploy_fetcher
            + deploy_gossiper
            + block_proposer
            + block_validator
            + linear_chain;

        self.mem_total.set(total);
        self.mem_metrics.set(metrics);
        self.mem_net.set(net);
        self.mem_address_gossiper.set(address_gossiper);
        self.mem_storage.set(storage);
        self.mem_contract_runtime.set(contract_runtime);
        self.mem_rpc_server.set(rpc_server);
        self.mem_rest_server.set(rest_server);
        self.mem_event_stream_server.set(event_stream_server);
        self.mem_chainspec_loader.set(chainspec_loader);
        self.mem_consensus.set(consensus);
        self.mem_deploy_fetcher.set(deploy_fetcher);
        self.mem_deploy_gossiper.set(deploy_gossiper);
        self.mem_block_proposer.set(block_proposer);
        self.mem_block_validator.set(block_validator);
        self.mem_linear_chain.set(linear_chain);

        // Stop the timer explicitly, don't count logging.
        let duration_s = timer.stop_and_record();

        debug!(%total,
               %duration_s,
               %metrics,
               %net,
               %address_gossiper,
               %storage,
               %contract_runtime,
               %rpc_server,
               %rest_server,
               %event_stream_server,
               %chainspec_loader,
               %consensus,
               %deploy_fetcher,
               %deploy_gossiper,
               %block_proposer,
               %block_validator,
               %linear_chain,
               "Collected new set of memory metrics.");
    }
/// Estimates memory usage and updates metrics.
Estimates memory usage and updates metrics.
Estimates memory usage and updates metrics .
pub(super) fn estimate(&self, reactor: &Reactor) {
        let timer = self.mem_estimator_runtime_s.start_timer();
        let metrics = reactor.metrics.estimate_heap_size() as i64;
        let net = reactor.small_network.estimate_heap_size() as i64;
        let address_gossiper = reactor.address_gossiper.estimate_heap_size() as i64;
        let storage = reactor.storage.estimate_heap_size() as i64;
        let contract_runtime = reactor.contract_runtime.estimate_heap_size() as i64;
        let rpc_server = reactor.rpc_server.estimate_heap_size() as i64;
        let rest_server = reactor.rest_server.estimate_heap_size() as i64;
        let event_stream_server = reactor.event_stream_server.estimate_heap_size() as i64;
        let chainspec_loader = reactor.chainspec_loader.estimate_heap_size() as i64;
        let consensus = reactor.consensus.estimate_heap_size() as i64;
        let deploy_fetcher = reactor.deploy_fetcher.estimate_heap_size() as i64;
        let deploy_gossiper = reactor.deploy_gossiper.estimate_heap_size() as i64;
        let block_proposer = reactor.block_proposer.estimate_heap_size() as i64;
        let block_validator = reactor.block_validator.estimate_heap_size() as i64;
        let linear_chain = reactor.linear_chain.estimate_heap_size() as i64;
        let total = metrics
            + net
            + address_gossiper
            + storage
            + contract_runtime
            + rpc_server
            + rest_server
            + event_stream_server
            + chainspec_loader
            + consensus
            + deploy_fetcher
            + deploy_gossiper
            + block_proposer
            + block_validator
            + linear_chain;
        self.mem_total.set(total);
        self.mem_metrics.set(metrics);
        self.mem_net.set(net);
        self.mem_address_gossiper.set(address_gossiper);
        self.mem_storage.set(storage);
        self.mem_contract_runtime.set(contract_runtime);
        self.mem_rpc_server.set(rpc_server);
        self.mem_rest_server.set(rest_server);
        self.mem_event_stream_server.set(event_stream_server);
        self.mem_chainspec_loader.set(chainspec_loader);
        self.mem_consensus.set(consensus);
        self.mem_deploy_fetcher.set(deploy_fetcher);
        self.mem_deploy_gossiper.set(deploy_gossiper);
        self.mem_block_proposer.set(block_proposer);
        self.mem_block_validator.set(block_validator);
        self.mem_linear_chain.set(linear_chain);
        // Stop the timer explicitly, don't count logging.
        let duration_s = timer.stop_and_record();
        debug!(%total,
               %duration_s,
               %metrics,
               %net,
               %address_gossiper,
               %storage,
               %contract_runtime,
               %rpc_server,
               %rest_server,
               %event_stream_server,
               %chainspec_loader,
               %consensus,
               %deploy_fetcher,
               %deploy_gossiper,
               %block_proposer,
               %block_validator,
               %linear_chain,
               "Collected new set of memory metrics.");
    }
pub ( super ) fn estimate ( & self , reactor : & Reactor ) { let timer = self . mem_estimator_runtime_s . start_timer ( ) ; let metrics = reactor . metrics . estimate_heap_size ( ) as i64 ; let net = reactor . small_network . estimate_heap_size ( ) as i64 ; let address_gossiper = reactor . address_gossiper . estimate_heap_size ( ) as i64 ; let storage = reactor . storage . estimate_heap_size ( ) as i64 ; let contract_runtime = reactor . contract_runtime . estimate_heap_size ( ) as i64 ; let rpc_server = reactor . rpc_server . estimate_heap_size ( ) as i64 ; let rest_server = reactor . rest_server . estimate_heap_size ( ) as i64 ; let event_stream_server = reactor . event_stream_server . estimate_heap_size ( ) as i64 ; let chainspec_loader = reactor . chainspec_loader . estimate_heap_size ( ) as i64 ; let consensus = reactor . consensus . estimate_heap_size ( ) as i64 ; let deploy_fetcher = reactor . deploy_fetcher . estimate_heap_size ( ) as i64 ; let deploy_gossiper = reactor . deploy_gossiper . estimate_heap_size ( ) as i64 ; let block_proposer = reactor . block_proposer . estimate_heap_size ( ) as i64 ; let block_validator = reactor . block_validator . estimate_heap_size ( ) as i64 ; let linear_chain = reactor . linear_chain . estimate_heap_size ( ) as i64 ; let total = metrics + net + address_gossiper + storage + contract_runtime + rpc_server + rest_server + event_stream_server + chainspec_loader + consensus + deploy_fetcher + deploy_gossiper + block_proposer + block_validator + linear_chain ; self . mem_total . set ( total ) ; self . mem_metrics . set ( metrics ) ; self . mem_net . set ( net ) ; self . mem_address_gossiper . set ( address_gossiper ) ; self . mem_storage . set ( storage ) ; self . mem_contract_runtime . set ( contract_runtime ) ; self . mem_rpc_server . set ( rpc_server ) ; self . mem_rest_server . set ( rest_server ) ; self . mem_event_stream_server . set ( event_stream_server ) ; self . mem_chainspec_loader . set ( chainspec_loader ) ; self . mem_consensus . set ( consensus ) ; self . mem_deploy_fetcher . set ( deploy_fetcher ) ; self . mem_deploy_gossiper . set ( deploy_gossiper ) ; self . mem_block_proposer . set ( block_proposer ) ; self . mem_block_validator . set ( block_validator ) ; self . mem_linear_chain . set ( linear_chain ) ; // Stop the timer explicitly, don't count logging. let duration_s = timer . stop_and_record ( ) ; debug ! ( total duration_s metrics net address_gossiper storage contract_runtime rpc_server rest_server event_stream_server chainspec_loader consensus deploy_fetcher deploy_gossiper block_proposer block_validator linear_chain " " ) ; }
Estimates memory usage and updates metrics.
Estimates memory usage and updates metrics .
&self
reactor
&Reactor
&self
reactor
&Reactor