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

Int validation performance improvement #620

Merged
merged 7 commits into from
May 22, 2023
Merged

Int validation performance improvement #620

merged 7 commits into from
May 22, 2023

Conversation

samuelcolvin
Copy link
Member

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented May 21, 2023

Codecov Report

Merging #620 (6374333) into main (ed43fb3) will increase coverage by 0.04%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #620      +/-   ##
==========================================
+ Coverage   93.99%   94.03%   +0.04%     
==========================================
  Files          98       98              
  Lines       13296    13286      -10     
  Branches       25       25              
==========================================
- Hits        12497    12493       -4     
+ Misses        793      787       -6     
  Partials        6        6              
Impacted Files Coverage Δ
pydantic_core/core_schema.py 96.86% <ø> (ø)
src/input/mod.rs 100.00% <ø> (ø)
src/validators/union.rs 86.47% <ø> (ø)
src/errors/types.rs 84.33% <100.00%> (+0.04%) ⬆️
src/input/input_abstract.rs 85.29% <100.00%> (ø)
src/input/input_json.rs 91.16% <100.00%> (+1.77%) ⬆️
src/input/input_python.rs 98.37% <100.00%> (-0.06%) ⬇️
src/input/return_enums.rs 88.95% <100.00%> (+0.23%) ⬆️
src/validators/int.rs 100.00% <100.00%> (ø)
src/validators/literal.rs 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed43fb3...6374333. Read the comment docs.

@codspeed-hq
Copy link

codspeed-hq bot commented May 21, 2023

CodSpeed Performance Report

Merging #620 int-validation (6374333) will not alter performances.

Summary

🔥 21 improvements
❌ 0 regressions
✅ 98 untouched benchmarks

🆕 1 new benchmarks
⁉️ 0 dropped benchmarks

Benchmarks breakdown

Benchmark main int-validation Change
🔥 test_complete_core_strict 1.6 ms 1.4 ms 14.21%
🔥 test_complete_core_error 8.6 ms 7.4 ms 13.31%
🔥 test_complete_core_isinstance 8.5 ms 7.3 ms 13.69%
🔥 test_core_python_fs 391.8 µs 339.5 µs 13.36%
🔥 test_list_of_ints_core_py 8.6 ms 2.6 ms 69.56%
🔥 test_set_of_ints_core 10.5 ms 3.8 ms 63.41%
🔥 test_set_of_ints_core_duplicates 8.2 ms 2.3 ms 72.27%
🔥 test_set_of_ints_core_length 10.6 ms 3.9 ms 62.92%
🔥 test_frozenset_of_ints_core 2.4 ms 1.3 ms 45.22%
🔥 test_frozenset_of_ints_duplicates_core 1,250.6 µs 995.7 µs 20.39%
🔥 test_dict_of_ints_core 12.6 ms 6 ms 52.29%
🔥 test_many_models_core_dict 5.5 ms 4.9 ms 11.17%
🔥 test_list_of_nullable_core 992.5 µs 625.8 µs 36.95%
🔥 test_positional_tuple 37 µs 25.4 µs 31.28%
🔥 test_variable_tuple 37.4 µs 25.9 µs 30.64%
🔥 test_int_error 78 µs 68.4 µs 12.33%
🔥 test_definition_in_tree 28.7 ms 5.6 ms 80.65%
🔥 test_definition_out_of_tree 32.6 ms 9.4 ms 71.16%
🔥 test_model_instance 57.2 µs 46.9 µs 18.07%
🔥 test_model_instance_abc 60.7 µs 47.9 µs 21.11%
🔥 test_core_root_model 120.4 µs 93.1 µs 22.66%
🆕 test_strict_int N/A 15.4 µs N/A

@samuelcolvin samuelcolvin marked this pull request as ready for review May 21, 2023 03:06
@samuelcolvin samuelcolvin merged commit 8d12f96 into main May 22, 2023
@samuelcolvin samuelcolvin deleted the int-validation branch May 22, 2023 12:29
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.

2 participants