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

[nfc] api headers benchmark #1089

Merged
merged 2 commits into from
Aug 30, 2023
Merged

Conversation

mikea
Copy link
Collaborator

@mikea mikea commented Aug 29, 2023

No description provided.

@mikea mikea requested review from jasnell and fhanau August 29, 2023 20:50
@mikea mikea force-pushed the maizatskyi/2023-08-29-api-headers-bench branch from c4844b4 to 848351d Compare August 29, 2023 20:52
}

void TearDown(benchmark::State& state) noexcept(true) override {
fixture = nullptr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

PR LGTM overall, but can you explain what the virtual destructor and fixture = nullptr; statements are used for? I'd imagine that the virtual destructor means that just the benchmark::Fixture destructor is used and that fixture is set to nullptr so that kj::Own knows it can free it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

virtual destructor is needed to annotate it by noexcept. otherwise in our code base clang assumes it has a different exception specification.

I use fixture = null to force- destroy an Isolate. Not entirely sure what's the fixture lifecycle yet.

@mikea mikea merged commit 52e77ab into main Aug 30, 2023
@mikea mikea deleted the maizatskyi/2023-08-29-api-headers-bench branch August 30, 2023 22:27
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