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

chore(sequencer-relayer): change compression ratio calculation #1075

Merged
merged 2 commits into from
May 15, 2024

Conversation

Fraser999
Copy link
Contributor

Summary

Inverts the compression ratio calculation.

Background

It's normal to express a compression ratio as uncompressed:compressed, but were reporting it as the inverse of this in logs and metrics (despite the metric's description claiming it was uncompressed:compressed).

Changes

As per summary.

Testing

Added a unit test.

Metrics

No new metric added, but the value of astria_sequencer_relayer_compression_ratio_for_astria_block should now generally be > 1 rather than < 1.

@Fraser999 Fraser999 requested a review from a team as a code owner May 15, 2024 11:01
@Fraser999 Fraser999 requested a review from noot May 15, 2024 11:01
@github-actions github-actions bot added the sequencer-relayer pertaining to the astria-sequencer-relayer crate label May 15, 2024
Copy link
Member

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

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

Looks good. I think we can forego the unit test altogether because a) the compression ratio can actually be smaller 1, and b) this code is just a visual crutch.

@Fraser999 Fraser999 enabled auto-merge May 15, 2024 11:48
@Fraser999 Fraser999 added this pull request to the merge queue May 15, 2024
Merged via the queue into main with commit 59bdae7 May 15, 2024
36 checks passed
@Fraser999 Fraser999 deleted the fraser/change-compression-ratio-calc branch May 15, 2024 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sequencer-relayer pertaining to the astria-sequencer-relayer crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants