Reset program cache stats after submit (#31929)

This commit is contained in:
Pankaj Garg 2023-06-02 01:16:49 -07:00 committed by GitHub
parent e3ac4258ee
commit 29d7a57cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -170,6 +170,10 @@ impl Stats {
);
}
}
pub fn reset(&mut self) {
*self = Stats::default();
}
}
#[derive(Debug, Default)]

View File

@ -1681,6 +1681,7 @@ impl Bank {
.stats
.submit(parent.slot());
new.loaded_programs_cache.write().unwrap().stats.reset();
new
}