Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add benchmarks for categories: serialization, validation and schema generation#10240

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@AdolfoVillalobos
Copy link
Contributor

@AdolfoVillalobosAdolfoVillalobos commentedAug 27, 2024
edited by sydney-runkle
Loading

Change Summary

I created three tests to benchmark Pydantic's performance in basic categories:

  • Schema generation
  • Serialization
  • Validation.

The tests handle varying levels of complexity ranging from simple tests to nested scenarios, inspired by the pydantic-core test suite.

Related issue number

Contributes to#9711

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review,please add a comment including the phrase "please review" to assign reviewers

@github-actionsgithub-actionsbot added the relnotes-fixUsed for bugfixes. labelAug 27, 2024
@AdolfoVillalobosAdolfoVillalobos mentioned this pull requestAug 27, 2024
12 tasks
@codspeed-hq
Copy link

codspeed-hqbot commentedAug 27, 2024
edited
Loading

CodSpeed Performance Report

Merging#10240 willnot alter performance

ComparingAdolfoVillalobos:test/expand-breadth-of-benchmarks (5bd3887) withmain (9ad349a)

Summary

✅ 17 untouched benchmarks

🆕 13 new benchmarks

Benchmarks breakdown

BenchmarkmainAdolfoVillalobos:test/expand-breadth-of-benchmarksChange
🆕test_complex_model_schema_generationN/A3.4 msN/A
🆕test_nested_model_schema_generationN/A3.6 msN/A
🆕test_recursive_model_schema_generationN/A1.9 msN/A
🆕test_simple_model_schema_generationN/A1.5 msN/A
🆕test_complex_model_serializationN/A52.4 µsN/A
🆕test_list_of_models_serializationN/A62.7 µsN/A
🆕test_model_json_serializationN/A57.2 µsN/A
🆕test_nested_model_serializationN/A44.1 µsN/A
🆕test_simple_model_serializationN/A34.8 µsN/A
🆕test_complex_model_validationN/A58.1 µsN/A
🆕test_list_of_models_validationN/A100.2 µsN/A
🆕test_nested_model_validationN/A57.3 µsN/A
🆕test_simple_model_validationN/A44.3 µsN/A

@AdolfoVillalobos
Copy link
ContributorAuthor

I'm lost as to why the tests are failing. I can't see how my code is impacting them. I would really appreciate some advice ;) Thanks!

@Viicos
Copy link
Member

Viicos commentedAug 27, 2024
edited
Loading

Thanks for taking a stab at this. Regarding the benchmarks related to core schema generation, I'll probably expand these to meet my needs (related to#10223). I'll make sure to add you as a co-author.

AdolfoVillalobos reacted with thumbs up emoji

@sydney-runklesydney-runkle added relnotes-ignoreOmit this PR from the release notes. and removed relnotes-fixUsed for bugfixes. labelsAug 27, 2024
@sydney-runkle
Copy link
Contributor

Hmm, test failure does seem odd.

@AdolfoVillalobos, amazing work here - thanks for helping us to expand our benchmarks!

AdolfoVillalobos reacted with rocket emoji

@sydney-runkle
Copy link
Contributor

So odd, I can't repo that test failure locally, even when pulling your changes

@sydney-runklesydney-runkleenabled auto-merge (squash)August 27, 2024 13:21
Copy link
Contributor

@sydney-runklesydney-runkle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'll investigate this test failure on a separate branch, but have pushed a patch fix for now.

@sydney-runklesydney-runkle merged commit9b72ef3 intopydantic:mainAug 27, 2024
@github-actions
Copy link
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@AdolfoVillalobos
Copy link
ContributorAuthor

Thanks for taking a stab at this. Regarding the benchmarks related to core schema generation, I'll probably expand these to meet my needs (related to#10223). I'll make sure to add you as a co-author.

I'm glad this PR was helpful ;) Thanks!

@AdolfoVillalobos
Copy link
ContributorAuthor

I'll investigate this test failure on a separate branch, but have pushed a patch fix for now.

Yess, it was a bit odd. I still don't quite get what was broken.

In any case, thanks for the help and support ;).

I love this project; It has helped me many times, so I am happy and proud to make my first contribution. Hopefully, I will continue to contribute in the future ;)

Viicos reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@sydney-runklesydney-runklesydney-runkle approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

relnotes-ignoreOmit this PR from the release notes.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@AdolfoVillalobos@Viicos@sydney-runkle

[8]ページ先頭

©2009-2025 Movatter.jp