Skip to content

Conversation

@dafnamatsry
Copy link
Collaborator

No description provided.

@dafnamatsry dafnamatsry marked this pull request as ready for review January 4, 2026 11:54
@reviewable-StarkWare
Copy link

This change is Reviewable

@github-actions
Copy link

github-actions bot commented Jan 4, 2026

Copy link
Collaborator Author

dafnamatsry commented Jan 4, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 5 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dafnamatsry and @TzahiTaub).


crates/apollo_mempool/src/mempool_test.rs line 1340 at r2 (raw file):

        }
    "#]]
    .assert_debug_eq(&MempoolMetrics::from_recorder(&recorder));

the histogram fields are likely to vary, right?
do you care about their regression?
if not, I would delete these fields:

    let mut metrics = MempoolMetrics::from_recorder(&recorder);
    metrics.transaction_time_spent_until_batched.histogram = Default::default();
    metrics.transaction_time_spent_until_committed.histogram = Default::default();    
    expect![[r#".."]].assert_debug_eq(&metrics);

Suggestion:

    let mut metrics = MempoolMetrics::from_recorder(&recorder);
    metrics.transaction_time_spent_until_batched.histogram = Default::default();
    metrics.transaction_time_spent_until_committed.histogram = Default::default();    
    expect![[r#"
        MempoolMetrics {
            txs_received_invoke: 8,
            txs_received_declare: 2,
            txs_received_deploy_account: 0,
            txs_committed: 3,
            txs_dropped_expired: 1,
            txs_dropped_rejected: 1,
            txs_dropped_evicted: 1,
            pool_size: 3,
            priority_queue_size: 2,
            pending_queue_size: 1,
            get_txs_size: 1,
            delayed_declares_size: 1,
            total_size_in_bytes: 1552,
            transaction_time_spent_until_batched: HistogramValue {
                sum: 2.0,
                count: 1,
                histogram: {
                    "0": 2.0,
                    "0.5": 1.9999056357269998,
                    "0.9": 1.9999056357269998,
                    "0.95": 1.9999056357269998,
                    "0.99": 1.9999056357269998,
                    "0.999": 1.9999056357269998,
                    "1": 2.0,
                },
            },
            transaction_time_spent_until_committed: HistogramValue {
                sum: 42.0,
                count: 3,
                histogram: {
                    "0": 0.0,
                    "0.5": 19.999354639046004,
                    "0.9": 19.999354639046004,
                    "0.95": 19.999354639046004,
                    "0.99": 19.999354639046004,
                    "0.999": 19.999354639046004,
                    "1": 22.0,
                },
            },
        }
    "#]]
    .assert_debug_eq(&metrics);

crates/apollo_mempool/src/test_utils.rs line 360 at r2 (raw file):

            .assert_eq(metrics, &self.transaction_time_spent_until_batched);
        TRANSACTION_TIME_SPENT_UNTIL_COMMITTED
            .assert_eq(metrics, &self.transaction_time_spent_until_committed);

previously, you sent Default::default() histograms to this assert_eq function; how did it work before?

Code quote:

        TRANSACTION_TIME_SPENT_UNTIL_BATCHED
            .assert_eq(metrics, &self.transaction_time_spent_until_batched);
        TRANSACTION_TIME_SPENT_UNTIL_COMMITTED
            .assert_eq(metrics, &self.transaction_time_spent_until_committed);

@dafnamatsry dafnamatsry force-pushed the dafna/metric-tests-expect branch from e15adfe to 46a01cb Compare January 5, 2026 10:46
Copy link
Collaborator Author

@dafnamatsry dafnamatsry left a comment

Choose a reason for hiding this comment

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

@dafnamatsry made 2 comments.
Reviewable status: 4 of 5 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware and @TzahiTaub).


crates/apollo_mempool/src/mempool_test.rs line 1340 at r2 (raw file):

Previously, dorimedini-starkware wrote…

the histogram fields are likely to vary, right?
do you care about their regression?
if not, I would delete these fields:

    let mut metrics = MempoolMetrics::from_recorder(&recorder);
    metrics.transaction_time_spent_until_batched.histogram = Default::default();
    metrics.transaction_time_spent_until_committed.histogram = Default::default();    
    expect![[r#".."]].assert_debug_eq(&metrics);

Done.


crates/apollo_mempool/src/test_utils.rs line 360 at r2 (raw file):

Previously, dorimedini-starkware wrote…

previously, you sent Default::default() histograms to this assert_eq function; how did it work before?

The PartialEq implementation of HistogramValue ignores the histogram field.

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 1 file and all commit messages, and resolved 2 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub).

@dafnamatsry dafnamatsry force-pushed the dafna/metric-tests-expect branch from 46a01cb to 131463d Compare January 5, 2026 12:35
Copy link
Collaborator Author

@dafnamatsry dafnamatsry left a comment

Choose a reason for hiding this comment

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

@dafnamatsry reviewed 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub).

@dafnamatsry dafnamatsry added this pull request to the merge queue Jan 5, 2026
Merged via the queue into main-v0.14.1-committer with commit 48fc80d Jan 5, 2026
27 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants