btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.09k stars 2.31k forks source link

blockchain: Test & Check Memory Usage #2167

Open web3santa opened 2 months ago

web3santa commented 2 months ago

Use the newUtxoCache function to create a 1MB simulated newUtxoCache instance.

Call the totalMemoryUsage method to compare the returned result to the expected size of 1 MB.

If the result is different from the expected size, the test fails and outputs an error message.

This test code is responsible for ensuring that the memory usage of newUtxoCache matches the expected value.

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 8680316882

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Files with Coverage Reduction New Missed Lines %
peer/peer.go 1 74.52%
mempool/mempool.go 1 66.84%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 8636847188: 0.02%
Covered Lines: 29456
Relevant Lines: 51781

💛 - Coveralls