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

Generation performance enhancements #1348

Merged
merged 3 commits into from
Jul 1, 2024

Conversation

tecimovic
Copy link
Collaborator

@tecimovic tecimovic commented Jun 25, 2024

Further performance enhancements...

  1. Add back the sequential template generation for better reporting.
  2. Add a test template generation for the least performing one.

@tecimovic tecimovic marked this pull request as ready for review June 28, 2024 01:14
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add documentation to our GitHub developer documentation on how to do profiling for generation?

Copy link
Collaborator Author

@tecimovic tecimovic Jul 1, 2024

Choose a reason for hiding this comment

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

Yeah, I will do that on a separate commit....

@@ -752,7 +764,9 @@ async function generateSingleTemplate(
disableDeprecationWarnings: false,
}
) {
env.logInfo(`Start generating from template: ${genTemplateJsonPackage?.path}`)
let genStart = process.hrtime.bigint()
//console.log(`Start generating from template: ${singleTemplatePkg?.path}`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we keep the console.log? I think it is generally nice to see this during all our generations instead of seeing it in some hidden form unless logInfo does console.log.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Console.log prints out the totals. I think it would be too much clutter if we print out these individual templates.

`Finish generating from template: ${genTemplateJsonPackage?.path}`
`Finish generating from template: ${
singleTemplatePkg?.path
}: ${util.duration(nsDuration)}`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, do we continue to get the cumulative generation time like we did before?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that didn't change.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Confused what really happened here between these test.js files

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

At some point the numbers shifted.
We have test data: matter1/2/3/4.
Then we had tests: matter1/2/3/4.

However Matter test 3 started using data 4. So when I added data 5, I would create test 4 and that felt stupid.
So I moved matter4 test to be named matter-3-1, since it uses test data 3 and then a new test data 4 can be used by matter test 4, so that the numbers align.

@tecimovic tecimovic merged commit 6f3fe39 into project-chip:master Jul 1, 2024
13 checks passed
@tecimovic tecimovic deleted the performance-updates branch July 1, 2024 12:26
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.

3 participants