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-3995: Make value required for properties with metadata #6309

Merged

Conversation

TimDiekmann
Copy link
Member

🌟 What is the purpose of this PR?

To distinguish between the array and the object variant of properties, the value needs to be defined. Then, it's possible to check, if value is an array or an object.

There is one drive-by change to enable more tests in CI

CiaranMn
CiaranMn previously approved these changes Jan 31, 2025
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 21.03%. Comparing base (000dd34) to head (945d0e6).
Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
.../src/activities/infer-entities/propose-entities.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6309      +/-   ##
==========================================
- Coverage   21.03%   21.03%   -0.01%     
==========================================
  Files         580      580              
  Lines       19831    19832       +1     
  Branches     2929     2929              
==========================================
  Hits         4171     4171              
- Misses      15608    15609       +1     
  Partials       52       52              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.34% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.45 \mathrm{ms} \pm 17.2 \mathrm{μs}\left({\color{red}21.3 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$2.03 \mathrm{ms} \pm 8.29 \mathrm{μs}\left({\color{gray}-4.677 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$2.03 \mathrm{ms} \pm 7.20 \mathrm{μs}\left({\color{lightgreen}-9.175 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$2.24 \mathrm{ms} \pm 7.87 \mathrm{μs}\left({\color{gray}-4.007 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 50 entities $$4.06 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{gray}-4.989 \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/block/v/1 $$17.1 \mathrm{ms} \pm 196 \mathrm{μs}\left({\color{lightgreen}-27.373 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$18.4 \mathrm{ms} \pm 230 \mathrm{μs}\left({\color{lightgreen}-24.951 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$17.6 \mathrm{ms} \pm 201 \mathrm{μs}\left({\color{gray}3.43 \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 200 \mathrm{μs}\left({\color{gray}0.866 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$15.8 \mathrm{ms} \pm 180 \mathrm{μs}\left({\color{gray}-1.271 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$17.0 \mathrm{ms} \pm 208 \mathrm{μs}\left({\color{red}5.91 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$16.7 \mathrm{ms} \pm 220 \mathrm{μs}\left({\color{gray}1.78 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$17.7 \mathrm{ms} \pm 205 \mathrm{μs}\left({\color{red}7.79 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$18.1 \mathrm{ms} \pm 230 \mathrm{μs}\left({\color{red}6.92 \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.15 \mathrm{ms} \pm 7.03 \mathrm{μs}\left({\color{gray}0.051 \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 $$89.9 \mathrm{ms} \pm 522 \mathrm{μs}\left({\color{gray}0.529 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=2, E=2 $$86.9 \mathrm{ms} \pm 438 \mathrm{μs}\left({\color{gray}2.16 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=2 $$74.4 \mathrm{ms} \pm 488 \mathrm{μs}\left({\color{gray}1.86 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=2, PT=2, ET=2, E=2 $$93.1 \mathrm{ms} \pm 436 \mathrm{μs}\left({\color{gray}-0.198 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=255, PT=255, ET=255, E=255 $$107 \mathrm{ms} \pm 970 \mathrm{μs}\left({\color{gray}-0.238 \mathrm{\%}}\right) $$ Flame Graph
link_by_source_by_property depths: DT=0, PT=0, ET=0, E=0 $$39.3 \mathrm{ms} \pm 286 \mathrm{μs}\left({\color{gray}2.98 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=2, ET=2, E=2 $$55.6 \mathrm{ms} \pm 720 \mathrm{μs}\left({\color{gray}4.33 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=2, E=2 $$49.9 \mathrm{ms} \pm 348 \mathrm{μs}\left({\color{gray}1.93 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=2 $$44.0 \mathrm{ms} \pm 246 \mathrm{μs}\left({\color{gray}2.77 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=2, PT=2, ET=2, E=2 $$58.0 \mathrm{ms} \pm 447 \mathrm{μs}\left({\color{gray}2.57 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=255, PT=255, ET=255, E=255 $$67.9 \mathrm{ms} \pm 317 \mathrm{μs}\left({\color{gray}2.99 \mathrm{\%}}\right) $$ Flame Graph
entity_by_property depths: DT=0, PT=0, ET=0, E=0 $$39.2 \mathrm{ms} \pm 260 \mathrm{μs}\left({\color{gray}2.25 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_complete_one_depth

Function Value Mean Flame graphs
entity_by_id 25 entities $$86.7 \mathrm{ms} \pm 558 \mathrm{μs}\left({\color{lightgreen}-52.005 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$21.3 \mathrm{ms} \pm 100.0 \mathrm{μs}\left({\color{gray}-0.158 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 5 entities $$28.5 \mathrm{ms} \pm 547 \mathrm{μs}\left({\color{gray}3.23 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$59.2 \mathrm{ms} \pm 287 \mathrm{μs}\left({\color{red}80.8 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 50 entities $$273 \mathrm{ms} \pm 2.65 \mathrm{ms}\left({\color{lightgreen}-94.963 \mathrm{\%}}\right) $$ Flame Graph

scaling_read_entity_linkless

Function Value Mean Flame graphs
entity_by_id 100 entities $$2.22 \mathrm{ms} \pm 11.0 \mathrm{μs}\left({\color{gray}-2.402 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$3.19 \mathrm{ms} \pm 10.4 \mathrm{μs}\left({\color{gray}0.768 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$15.5 \mathrm{ms} \pm 87.8 \mathrm{μs}\left({\color{red}64.6 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1 entities $$2.02 \mathrm{ms} \pm 6.58 \mathrm{μs}\left({\color{gray}0.002 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$2.05 \mathrm{ms} \pm 9.01 \mathrm{μs}\left({\color{gray}0.748 \mathrm{\%}}\right) $$ Flame Graph

@TimDiekmann TimDiekmann added this pull request to the merge queue Feb 2, 2025
Merged via the queue into main with commit 3056eac Feb 2, 2025
102 checks passed
@TimDiekmann TimDiekmann deleted the t/h-3995-make-value-required-for-all-property-metadata branch February 2, 2025 20:47
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/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.

3 participants