Add method to reset plugin statsistics

This commit is contained in:
Robin Gareus 2020-06-26 12:47:28 +02:00
parent ef98492298
commit fbcb0b6443
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 9 additions and 0 deletions

View File

@ -74,6 +74,7 @@ public:
bool cancelled () { return _cancel_scan; }
bool no_timeout () { return _cancel_timeout; }
void reset_stats ();
void stats_use_plugin (PluginInfoPtr const&);
bool stats (PluginInfoPtr const&, int64_t& lru, uint64_t& use_count) const;
void save_stats ();

View File

@ -1673,6 +1673,14 @@ PluginManager::load_stats ()
}
}
void
PluginManager::reset_stats ()
{
statistics.clear ();
PluginStatsChanged (); /* EMIT SIGNAL */
save_stats ();
}
void
PluginManager::stats_use_plugin (PluginInfoPtr const& pip)
{