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

Measure sync #772

Merged
merged 4 commits into from
Aug 30, 2024
Merged

Measure sync #772

merged 4 commits into from
Aug 30, 2024

Conversation

Horusiath
Copy link
Collaborator

@Horusiath Horusiath commented Aug 30, 2024

This PR adds two metrics:

  • apply_update_time measures time spend on serving the update incoming from client (in milliseconds). This includes total time required to parse update, obtain a collab lock, apply an update and commit transaction.
  • apply_update_size measures size of update (in bytes).

We're using histogram here (due to lack of summary support in our prometheus client). We can adjust sizes of buckets over time (I guess).

This required to change the CollabSyncProtocol definitions, so that we have more control over sync step method overrides - otherwise we couldn't include update parsing time into measurements.

@Horusiath Horusiath requested a review from appflowy August 30, 2024 07:41
@appflowy appflowy merged commit 6972f9c into main Aug 30, 2024
9 of 10 checks passed
@appflowy appflowy deleted the measure-sync branch August 30, 2024 13:48
uxodb pushed a commit to uxodb/AppFlowy-Cloud that referenced this pull request Nov 13, 2024
* chore: redesign collab sync protocol to enable injection of metric tracking

* chore: track metrics for apply update on the server side

* chore: close locks

* chore: post rebase fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants