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

harpc: move types into harpc-types #5388

Merged
merged 2 commits into from
Oct 12, 2024
Merged

Conversation

indietyp
Copy link
Member

🌟 What is the purpose of this PR?

This moves the types:

  • ErrorCode from harpc-codec to harpc-types
    • an error occures in net and tower, but isn't codec specific, it's simply the code of an error
  • ResponseKind from harpc-net to harpc-types
    • this type is used for control flow control in both net and tower for slightly different but similar purposes.
  • ServiceDescriptor from harpc-net to harpc-types
    • this type is used in net and tower and user facing
  • ProcedureDescriptor from harpc-net to harpc-typs
    • this type is used in net and tower and user facing

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • affected the execution graph, and the turbo.json's have been updated to reflect this

@github-actions github-actions bot added area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team labels Oct 12, 2024
Copy link
Contributor

Benchmark results

@rust/graph-benches – Integrations

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$15.6 \mathrm{ms} \pm 175 \mathrm{μs}\left({\color{lightgreen}-35.210 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$15.5 \mathrm{ms} \pm 185 \mathrm{μs}\left({\color{gray}-3.062 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$16.4 \mathrm{ms} \pm 161 \mathrm{μs}\left({\color{gray}-0.875 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$16.2 \mathrm{ms} \pm 203 \mathrm{μs}\left({\color{lightgreen}-31.564 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$15.4 \mathrm{ms} \pm 182 \mathrm{μs}\left({\color{gray}0.063 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$17.1 \mathrm{ms} \pm 177 \mathrm{μs}\left({\color{gray}0.390 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$15.9 \mathrm{ms} \pm 160 \mathrm{μs}\left({\color{gray}1.50 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$16.5 \mathrm{ms} \pm 179 \mathrm{μs}\left({\color{gray}0.267 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$16.6 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{gray}3.90 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: d4e16033-c281-4cde-aa35-9085bf2e7579 $$1.41 \mathrm{ms} \pm 6.05 \mathrm{μs}\left({\color{gray}0.619 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_zero_depth

Function Value Mean Flame graphs
entity_by_id 50 entities $$3.93 \mathrm{ms} \pm 19.3 \mathrm{μs}\left({\color{gray}-2.471 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$1.99 \mathrm{ms} \pm 9.51 \mathrm{μs}\left({\color{gray}-3.481 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$2.51 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{lightgreen}-13.218 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$1.84 \mathrm{ms} \pm 11.3 \mathrm{μs}\left({\color{gray}-0.001 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$1.88 \mathrm{ms} \pm 10.6 \mathrm{μs}\left({\color{gray}0.219 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_linkless

Function Value Mean Flame graphs
entity_by_id 1000 entities $$3.05 \mathrm{ms} \pm 40.2 \mathrm{μs}\left({\color{gray}4.95 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$2.00 \mathrm{ms} \pm 6.20 \mathrm{μs}\left({\color{gray}0.803 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$1.82 \mathrm{ms} \pm 6.89 \mathrm{μs}\left({\color{gray}-0.816 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$12.5 \mathrm{ms} \pm 125 \mathrm{μs}\left({\color{red}40.4 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$1.86 \mathrm{ms} \pm 6.42 \mathrm{μs}\left({\color{gray}1.84 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property depths: DT=2, PT=2, ET=2, E=2 $$58.7 \mathrm{ms} \pm 282 \mathrm{μs}\left({\color{gray}-0.216 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=255, PT=255, ET=255, E=255 $$67.5 \mathrm{ms} \pm 440 \mathrm{μs}\left({\color{gray}-0.320 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=0 $$39.9 \mathrm{ms} \pm 187 \mathrm{μs}\left({\color{gray}1.08 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=2 $$44.1 \mathrm{ms} \pm 240 \mathrm{μs}\left({\color{gray}1.24 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=2, ET=2, E=2 $$54.2 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}-1.097 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=2, E=2 $$50.2 \mathrm{ms} \pm 284 \mathrm{μs}\left({\color{gray}-0.310 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=2, PT=2, ET=2, E=2 $$98.2 \mathrm{ms} \pm 450 \mathrm{μs}\left({\color{gray}-0.195 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=255, PT=255, ET=255, E=255 $$107 \mathrm{ms} \pm 672 \mathrm{μs}\left({\color{gray}-0.173 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=0 $$41.9 \mathrm{ms} \pm 281 \mathrm{μs}\left({\color{gray}0.111 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=2 $$79.6 \mathrm{ms} \pm 382 \mathrm{μs}\left({\color{gray}-0.671 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=2, ET=2, E=2 $$93.9 \mathrm{ms} \pm 385 \mathrm{μs}\left({\color{gray}-0.436 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=2, E=2 $$89.9 \mathrm{ms} \pm 335 \mathrm{μs}\left({\color{gray}-0.428 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_one_depth

Function Value Mean Flame graphs
entity_by_id 50 entities $$272 \mathrm{ms} \pm 1.80 \mathrm{ms}\left({\color{lightgreen}-30.914 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$50.9 \mathrm{ms} \pm 171 \mathrm{μs}\left({\color{gray}-0.730 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$72.0 \mathrm{ms} \pm 357 \mathrm{μs}\left({\color{gray}-1.314 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$19.7 \mathrm{ms} \pm 105 \mathrm{μs}\left({\color{gray}-1.064 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$24.7 \mathrm{ms} \pm 209 \mathrm{μs}\left({\color{gray}0.497 \mathrm{\%}}\right) $$ Flame Graph

Merged via the queue into main with commit ff02167 Oct 12, 2024
161 checks passed
@indietyp indietyp deleted the bm/harpc/greater-separation branch October 12, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team
Development

Successfully merging this pull request may close these issues.

2 participants