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

Loans: Support for benchmarking prices #1372

Merged
merged 2 commits into from
May 29, 2023

Conversation

lemunozm
Copy link
Contributor

Description

  • Added a MaxCollectionSize associated type that is only used under runtime-benchmarks.

By now, I think always using the maximum size of a price collection in benchmarks is ok. In comparison with the work done in portfolio_valuation over each ActiveLoan, deserializing once a small or a big vector of prices should not affect too much the final value.

If in the future, we need to struggle more with the benchmarks, we can add this as a variable parameter.

Associated to #1279

@lemunozm lemunozm added D0-ready Pull request can be merged without special precaution and notification. Q3-medium Can be done with good experience in the language, but little knowledge of the codebase. P5-soon Issue should be addressed soon. I8-enhancement An additional feature. labels May 29, 2023
@lemunozm lemunozm self-assigned this May 29, 2023
@lemunozm lemunozm mentioned this pull request May 29, 2023
9 tasks
Copy link
Contributor

@hieronx hieronx left a comment

Choose a reason for hiding this comment

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

I would have expected that we needed to enforce the MaxCollectionSize somewhere, e.g. when creating a new loan with a specific price ID. Is there already somewhere implicitly checked?

@lemunozm
Copy link
Contributor Author

The price collection is only increased when a new price is registered using DataCollector::register_id() once a loan becomes active. Inside the register_id() is the check I think you're looking for.

@lemunozm lemunozm force-pushed the loans/benchmarking-prices-support branch from 9407567 to 162db35 Compare May 29, 2023 12:19
@lemunozm lemunozm enabled auto-merge (squash) May 29, 2023 12:19
@lemunozm
Copy link
Contributor Author

Rebased

@lemunozm lemunozm requested a review from hieronx May 29, 2023 12:20
@lemunozm lemunozm merged commit ea4af8c into main May 29, 2023
11 checks passed
@lemunozm lemunozm deleted the loans/benchmarking-prices-support branch May 29, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D0-ready Pull request can be merged without special precaution and notification. I8-enhancement An additional feature. P5-soon Issue should be addressed soon. Q3-medium Can be done with good experience in the language, but little knowledge of the codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants