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

H-3979: Expose a convert token in query paths #6301

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

TimDiekmann
Copy link
Member

🌟 What is the purpose of this PR?

It does not add any type safety as we have string in the list of possible tokens, however, having "convert" in the list of tokens will make DX easier.

@TimDiekmann TimDiekmann requested a review from CiaranMn January 30, 2025 10:36
@TimDiekmann TimDiekmann self-assigned this Jan 30, 2025
@github-actions github-actions bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team labels Jan 30, 2025
@TimDiekmann TimDiekmann enabled auto-merge January 30, 2025 10:51
@TimDiekmann TimDiekmann added this pull request to the merge queue Jan 30, 2025
Merged via the queue into main with commit 86f29d6 Jan 30, 2025
74 checks passed
@TimDiekmann TimDiekmann deleted the t/h-3979-expose-a-convert-token-in-query-paths branch January 30, 2025 11:05
Copy link
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

scaling_read_entity_complete_zero_depth

Function Value Mean Flame graphs
entity_by_id 25 entities $$3.40 \mathrm{ms} \pm 10.8 \mathrm{μs}\left({\color{gray}0.066 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$2.01 \mathrm{ms} \pm 7.05 \mathrm{μs}\left({\color{gray}-0.300 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$2.03 \mathrm{ms} \pm 14.4 \mathrm{μs}\left({\color{gray}0.262 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$2.13 \mathrm{ms} \pm 12.1 \mathrm{μs}\left({\color{gray}-0.196 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 50 entities $$4.08 \mathrm{ms} \pm 19.2 \mathrm{μs}\left({\color{gray}-3.213 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$16.1 \mathrm{ms} \pm 185 \mathrm{μs}\left({\color{lightgreen}-32.252 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$16.8 \mathrm{ms} \pm 201 \mathrm{μs}\left({\color{lightgreen}-29.123 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$17.0 \mathrm{ms} \pm 215 \mathrm{μs}\left({\color{gray}3.21 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$16.2 \mathrm{ms} \pm 188 \mathrm{μs}\left({\color{lightgreen}-5.754 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$17.3 \mathrm{ms} \pm 226 \mathrm{μs}\left({\color{gray}4.83 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$17.6 \mathrm{ms} \pm 233 \mathrm{μs}\left({\color{red}11.5 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$17.1 \mathrm{ms} \pm 199 \mathrm{μs}\left({\color{lightgreen}-5.467 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$16.8 \mathrm{ms} \pm 207 \mathrm{μs}\left({\color{lightgreen}-14.175 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$17.2 \mathrm{ms} \pm 224 \mathrm{μs}\left({\color{red}5.45 \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 $$2.13 \mathrm{ms} \pm 5.51 \mathrm{μs}\left({\color{gray}-0.539 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
link_by_source_by_property depths: DT=0, PT=2, ET=2, E=2 $$87.8 \mathrm{ms} \pm 251 \mathrm{μs}\left({\color{gray}-0.389 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=2, E=2 $$84.6 \mathrm{ms} \pm 472 \mathrm{μs}\left({\color{gray}1.39 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=2 $$75.4 \mathrm{ms} \pm 438 \mathrm{μs}\left({\color{gray}0.730 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=2, PT=2, ET=2, E=2 $$91.8 \mathrm{ms} \pm 402 \mathrm{μs}\left({\color{gray}-0.408 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=255, PT=255, ET=255, E=255 $$101 \mathrm{ms} \pm 511 \mathrm{μs}\left({\color{gray}0.965 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=0 $$39.2 \mathrm{ms} \pm 143 \mathrm{μs}\left({\color{gray}0.589 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=2, ET=2, E=2 $$54.1 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}0.636 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=2, E=2 $$49.7 \mathrm{ms} \pm 376 \mathrm{μs}\left({\color{gray}0.400 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=2 $$43.4 \mathrm{ms} \pm 146 \mathrm{μs}\left({\color{gray}0.311 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=2, PT=2, ET=2, E=2 $$57.8 \mathrm{ms} \pm 317 \mathrm{μs}\left({\color{gray}0.117 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=255, PT=255, ET=255, E=255 $$67.0 \mathrm{ms} \pm 413 \mathrm{μs}\left({\color{gray}1.06 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=0 $$39.5 \mathrm{ms} \pm 217 \mathrm{μs}\left({\color{gray}-1.678 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_one_depth

Function Value Mean Flame graphs
entity_by_id 25 entities $$85.3 \mathrm{ms} \pm 447 \mathrm{μs}\left({\color{gray}0.445 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$21.2 \mathrm{ms} \pm 119 \mathrm{μs}\left({\color{gray}-0.545 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$27.3 \mathrm{ms} \pm 113 \mathrm{μs}\left({\color{gray}-0.156 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$58.3 \mathrm{ms} \pm 312 \mathrm{μs}\left({\color{red}21.9 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 50 entities $$5.37 \mathrm{s} \pm 538 \mathrm{ms}\left({\color{red}1889 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_linkless

Function Value Mean Flame graphs
entity_by_id 100 entities $$2.23 \mathrm{ms} \pm 11.5 \mathrm{μs}\left({\color{gray}4.81 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$3.08 \mathrm{ms} \pm 19.4 \mathrm{μs}\left({\color{gray}4.28 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$13.9 \mathrm{ms} \pm 63.1 \mathrm{μs}\left({\color{gray}1.16 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$2.00 \mathrm{ms} \pm 6.43 \mathrm{μs}\left({\color{gray}-0.640 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$2.04 \mathrm{ms} \pm 8.68 \mathrm{μs}\left({\color{gray}0.178 \mathrm{\%}}\right) $$ Flame Graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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