Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
[Addon] Store Statistics information before deleting the VM instance
Browse files Browse the repository at this point in the history
  • Loading branch information
hydai committed Dec 1, 2020
1 parent 788f17c commit ca76494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssvmaddon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ void SSVMAddon::FiniVM() {
return;
}

Stat = VM->getStatistics();
delete VM;
VM = nullptr;
delete Configure;
Expand Down Expand Up @@ -623,7 +624,6 @@ Napi::Value SSVMAddon::GetStatistics(const Napi::CallbackInfo &Info) {
if (!Options.isMeasuring()) {
RetStat.Set("Measure", Napi::Boolean::New(Info.Env(), false));
} else {
Stat = VM->getStatistics();
auto Nano = [](auto &&Duration) {
return std::chrono::nanoseconds(Duration).count();
};
Expand Down

0 comments on commit ca76494

Please sign in to comment.