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-3370: Expand and expose graph visualization configuration settings #5242

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

CiaranMn
Copy link
Member

@CiaranMn CiaranMn commented Sep 26, 2024

🌟 What is the purpose of this PR?

This PR exposes the graph viz configuration settings to users via a panel, and also adds a setting to allow selecting, when a node is highlighted (hovered or clicked), which links will be followed when deciding which neighbors to highlight (all, inwards, or outwards).

It also fixes a bug related to fully capturing all links to link nodes, and updates the graph edges to be curved rather than straight.

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:

  • do not affect the execution graph

@github-actions github-actions bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps labels Sep 26, 2024
Copy link
Contributor

Benchmark results

@rust/graph-benches – Integrations

scaling_read_entity_linkless

Function Value Mean Flame graphs
entity_by_id 10 entities $$1.86 \mathrm{ms} \pm 6.10 \mathrm{μs}\left({\color{gray}-0.342 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$2.02 \mathrm{ms} \pm 9.76 \mathrm{μs}\left({\color{gray}0.637 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$2.74 \mathrm{ms} \pm 16.1 \mathrm{μs}\left({\color{gray}-0.125 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$12.6 \mathrm{ms} \pm 152 \mathrm{μs}\left({\color{gray}1.57 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$1.86 \mathrm{ms} \pm 5.19 \mathrm{μs}\left({\color{gray}0.908 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_zero_depth

Function Value Mean Flame graphs
entity_by_id 10 entities $$2.06 \mathrm{ms} \pm 10.6 \mathrm{μs}\left({\color{gray}1.22 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 50 entities $$3.95 \mathrm{ms} \pm 14.9 \mathrm{μs}\left({\color{lightgreen}-5.434 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$1.91 \mathrm{ms} \pm 9.81 \mathrm{μs}\left({\color{gray}0.100 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$2.73 \mathrm{ms} \pm 81.2 \mathrm{μs}\left({\color{red}8.51 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$1.87 \mathrm{ms} \pm 10.5 \mathrm{μs}\left({\color{gray}-0.529 \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/uk-address/v/1 $$16.6 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{gray}-0.734 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$16.0 \mathrm{ms} \pm 175 \mathrm{μs}\left({\color{lightgreen}-20.313 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$15.8 \mathrm{ms} \pm 169 \mathrm{μs}\left({\color{gray}-2.886 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$16.0 \mathrm{ms} \pm 164 \mathrm{μs}\left({\color{gray}4.11 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$16.8 \mathrm{ms} \pm 181 \mathrm{μs}\left({\color{gray}0.142 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$16.0 \mathrm{ms} \pm 172 \mathrm{μs}\left({\color{gray}3.09 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$15.4 \mathrm{ms} \pm 187 \mathrm{μs}\left({\color{gray}-0.745 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$17.0 \mathrm{ms} \pm 196 \mathrm{μs}\left({\color{gray}4.86 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$15.6 \mathrm{ms} \pm 185 \mathrm{μs}\left({\color{gray}-4.111 \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 3.33 \mathrm{μs}\left({\color{gray}1.43 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_one_depth

Function Value Mean Flame graphs
entity_by_id 10 entities $$50.0 \mathrm{ms} \pm 1.03 \mathrm{ms}\left({\color{red}8.12 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 50 entities $$269 \mathrm{ms} \pm 2.38 \mathrm{ms}\left({\color{gray}-0.698 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$24.6 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{gray}-0.591 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 25 entities $$74.1 \mathrm{ms} \pm 387 \mathrm{μs}\left({\color{gray}1.52 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$20.0 \mathrm{ms} \pm 93.3 \mathrm{μs}\left({\color{gray}0.518 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
link_by_source_by_property depths: DT=2, PT=2, ET=2, E=2 $$98.8 \mathrm{ms} \pm 404 \mathrm{μs}\left({\color{gray}1.63 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=2, ET=2, E=2 $$94.4 \mathrm{ms} \pm 310 \mathrm{μs}\left({\color{gray}0.847 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=255, PT=255, ET=255, E=255 $$108 \mathrm{ms} \pm 463 \mathrm{μs}\left({\color{gray}2.31 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=0 $$43.0 \mathrm{ms} \pm 280 \mathrm{μs}\left({\color{gray}1.77 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=2 $$80.5 \mathrm{ms} \pm 521 \mathrm{μs}\left({\color{gray}-0.292 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=2, E=2 $$90.7 \mathrm{ms} \pm 519 \mathrm{μs}\left({\color{gray}1.50 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=2, PT=2, ET=2, E=2 $$59.4 \mathrm{ms} \pm 298 \mathrm{μs}\left({\color{gray}0.216 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=2, ET=2, E=2 $$54.6 \mathrm{ms} \pm 253 \mathrm{μs}\left({\color{gray}0.691 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=255, PT=255, ET=255, E=255 $$68.1 \mathrm{ms} \pm 436 \mathrm{μs}\left({\color{gray}1.43 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=0 $$39.6 \mathrm{ms} \pm 274 \mathrm{μs}\left({\color{gray}-0.221 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=2 $$43.8 \mathrm{ms} \pm 293 \mathrm{μs}\left({\color{gray}-0.929 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=2, E=2 $$50.4 \mathrm{ms} \pm 385 \mathrm{μs}\left({\color{gray}-0.280 \mathrm{\%}}\right) $$ Flame Graph

@CiaranMn CiaranMn added this pull request to the merge queue Sep 27, 2024
Merged via the queue into main with commit fc8506a Sep 27, 2024
158 checks passed
@CiaranMn CiaranMn deleted the cm/expose-graph-viz-config branch September 27, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apps > hash* Affects HASH (a `hash-*` app) area/apps area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team
Development

Successfully merging this pull request may close these issues.

2 participants