Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More sanity byron random-specific benchmarks post restoration + JSON artifacts #2122

Merged
merged 5 commits into from
Sep 8, 2020

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Sep 8, 2020

Issue Number

#2032

Overview

  • 71f646d
    📍 more sanity benchmarks post-restoration

  • 771e590
    📍 revise benchmark logging to use structured logger instead of plain raw stdout For consistency and also, better log outputs.

  • 2b439b7
    📍 export benchmark results in structured JSON files for easier post-processing

  • 257e930
    📍 add 'importManyAddresses' to the benchmarks for comparison with single address import

Comments

Now also export JSON files as:

{
    "listAddressesTime": "2.037 s",
    "restoreTime": "964.3 s",
    "benchName": "50-percent-rnd",
    "readWalletTime": "938.2 ms",
    "utxoStatistics": {
        "distribution": {
            "10000000000000000": 0,
            "100000000000000": 4,
            "1000000000000": 1998,
            "10000000000": 5971,
            "100000000": 1130,
            "1000000": 805,
            "10000": 203,
            "100": 515,
            "1000000000": 3217,
            "100000000000": 9121,
            "10": 75,
            "45000000000000000": 0,
            "1000": 43,
            "10000000000000": 51,
            "1000000000000000": 5,
            "100000": 1661,
            "10000000": 710
        },
        "scale": "log10",
        "total": {
            "quantity": 5210508362190411,
            "unit": "lovelace"
        }
    },
    "importManyAddressesTime": "3.901 s",
    "importOneAddressTime": "1.706 s",
    "estimateFeesTime": "2.740 s"
}

@KtorZ KtorZ added the IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG label Sep 8, 2020
@KtorZ KtorZ requested review from Anviking and piotr-iohk September 8, 2020 14:10
@KtorZ KtorZ self-assigned this Sep 8, 2020
@KtorZ KtorZ changed the title Ktor z/benchmarks More sanity byron random-specific benchmarks post restoration + JSON artifacts Sep 8, 2020
@@ -94,6 +99,42 @@ import System.Random
import qualified Data.Map as Map
import qualified Data.Set as Set

class RndStateLike s where
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 (makes me wonder slightly again if records hadn't been nicer)

, importOneAddressTime :: Time
, importManyAddressesTime :: Time
, estimateFeesTime :: Time
, utxoStatistics :: s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see: why do you need to parametrise over s?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I didn't want to define a Buildable instance for ApiUtxoStatistics.

Copy link
Member

@Anviking Anviking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few details I didn't look at but, lgtm, and seems like a good idea!

@KtorZ
Copy link
Member Author

KtorZ commented Sep 8, 2020

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 8, 2020

Build succeeded:

@iohk-bors iohk-bors bot merged commit 76b3a6d into master Sep 8, 2020
@iohk-bors iohk-bors bot deleted the KtorZ/benchmarks branch September 8, 2020 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants