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

feat(sdk)!: support Map.tryGet() #4523

Merged
merged 3 commits into from
Oct 12, 2023
Merged

feat(sdk)!: support Map.tryGet() #4523

merged 3 commits into from
Oct 12, 2023

Conversation

hasanaburayyan
Copy link
Contributor

@hasanaburayyan hasanaburayyan commented Oct 12, 2023

Includes the changes from: #3771 that giovanni did.

Closes: #3575

Checklist

  • Title matches Winglang's style guide
  • Description explains motivation and solution
  • Tests added (always)
  • Docs updated (only required for features)
  • Added pr/e2e-full label if this feature requires end-to-end testing

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

Co-authored-by: Giovanni Orciuolo [email protected]
BREAKING CHANGE: Map.get() now throws if key does not exist.

@hasanaburayyan hasanaburayyan requested a review from a team as a code owner October 12, 2023 20:02
@monadabot
Copy link
Contributor

monadabot commented Oct 12, 2023

Console preview environment is available at https://wing-console-pr-4523.fly.dev 🚀

Last Updated (UTC) 2023-10-12 21:25

@monadabot
Copy link
Contributor

monadabot commented Oct 12, 2023

Benchmarks

Comparison to Baseline ⬜⬜⬜⬜🟥⬜⬜⬜⬜⬜⬜⬜⬜
Benchmark Before After Change
version 84ms±3.04 90ms±3.09 +6ms (+7.08%)⬜
functions_10.test.w -t sim 778ms±8.26 780ms±10.43 +2ms (+0.31%)⬜
functions_10.test.w -t tf-aws 4514ms±42.94 4644ms±79.15 +130ms (+2.88%)⬜
jsii_big.test.w -t sim 4154ms±32.87 4163ms±57.83 +9ms (+0.22%)⬜
jsii_big.test.w -t tf-aws 4270ms±36.29 4401ms±57.61 +131ms (+3.07%)🟥
hello_world.test.w -t sim 703ms±10.47 723ms±10.78 +20ms (+2.87%)⬜
hello_world.test.w -t tf-aws 5607ms±60.29 5694ms±52.41 +87ms (+1.55%)⬜
empty.test.w -t sim 649ms±9.46 649ms±8.18 0ms (-0.04%)⬜
empty.test.w -t tf-aws 823ms±11.1 804ms±11.15 -19ms (-2.3%)⬜
jsii_small.test.w -t sim 660ms±13.61 655ms±16.1 -5ms (-0.74%)⬜
jsii_small.test.w -t tf-aws 812ms±8.85 816ms±9.32 +5ms (+0.58%)⬜
functions_1.test.w -t sim 701ms±10.72 700ms±9.77 -1ms (-0.12%)⬜
functions_1.test.w -t tf-aws 2407ms±84.27 2471ms±90.33 +64ms (+2.66%)⬜

⬜ Within 1.5 standard deviations
🟩 Faster, Above 1.5 standard deviations
🟥 Slower, Above 1.5 standard deviations

Benchmarks may vary outside of normal expectations, especially when running in GitHub Actions CI.

Results
name mean min max moe sd
version 90ms 86ms 96ms 3ms 4ms
functions_10.test.w -t sim 780ms 768ms 809ms 10ms 15ms
functions_10.test.w -t tf-aws 4644ms 4454ms 4816ms 79ms 111ms
jsii_big.test.w -t sim 4163ms 4071ms 4298ms 58ms 81ms
jsii_big.test.w -t tf-aws 4401ms 4289ms 4557ms 58ms 81ms
hello_world.test.w -t sim 723ms 712ms 753ms 11ms 15ms
hello_world.test.w -t tf-aws 5694ms 5511ms 5832ms 52ms 73ms
empty.test.w -t sim 649ms 636ms 663ms 8ms 11ms
empty.test.w -t tf-aws 804ms 783ms 830ms 11ms 16ms
jsii_small.test.w -t sim 655ms 620ms 691ms 16ms 23ms
jsii_small.test.w -t tf-aws 816ms 804ms 831ms 9ms 13ms
functions_1.test.w -t sim 700ms 681ms 724ms 10ms 14ms
functions_1.test.w -t tf-aws 2471ms 2255ms 2695ms 90ms 126ms
Last Updated (UTC) 2023-10-12 21:35

@mergify
Copy link
Contributor

mergify bot commented Oct 12, 2023

Thanks for contributing, @hasanaburayyan! This PR will now be added to the merge queue, or immediately merged if hasan/fix-maps is up-to-date with main and the queue is empty.

@mergify mergify bot merged commit 41d8524 into main Oct 12, 2023
15 checks passed
@mergify mergify bot deleted the hasan/fix-maps branch October 12, 2023 21:39
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.38.0.

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.

Map.get() should throw if there is no value, and we should also offer tryGet()
5 participants