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

refactor(anta): Optimize AntaTemplate render performance. #654

Merged
merged 23 commits into from
Apr 29, 2024

Conversation

gmuloc
Copy link
Collaborator

@gmuloc gmuloc commented Apr 24, 2024

Description

Builds on top of:

Adds:

  • cprofile decorator around anta.runner.main
  • Do not create a pydantic model at every AntaTemplate.render() call. Instead, create a ParamsSchema model in AntaTemplate constructor where we can infer the fields.

Fixes #647

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

anta/models.py Outdated Show resolved Hide resolved
@gmuloc gmuloc marked this pull request as ready for review April 27, 2024 22:36
anta/models.py Show resolved Hide resolved
@gmuloc gmuloc merged commit 29ed0a6 into aristanetworks:main Apr 29, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ANTA runner performance issues at high scale
3 participants