diff options
author | Chris Xiong <chirs241097@gmail.com> | 2022-09-26 23:38:30 -0400 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2022-09-26 23:38:30 -0400 |
commit | 617adf4090fbaac3a3b2d943548eeb6516fb9bdd (patch) | |
tree | a356c89886ed03dcf0085b4075e754b5ddc3ae9b /xsig/src | |
parent | c95bd9595bdc612a78c6364ce6ca8f20ef28cd52 (diff) | |
download | deduper-617adf4090fbaac3a3b2d943548eeb6516fb9bdd.tar.xz |
Add show db engine memory usage.
Diffstat (limited to 'xsig/src')
-rw-r--r-- | xsig/src/signature_db.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xsig/src/signature_db.cpp b/xsig/src/signature_db.cpp index 3c4187b..105106b 100644 --- a/xsig/src/signature_db.cpp +++ b/xsig/src/signature_db.cpp @@ -479,6 +479,13 @@ std::vector<std::pair<size_t, double>> signature_db::search_image(const fs::path return ret; } +int64_t signature_db::db_memory_usage() +{ + sqlite3_int64 r, dummy; + sqlite3_status64(SQLITE_STATUS_MEMORY_USED, &r, &dummy, 0); + return static_cast<int64_t>(r); +} + void signature_db::ds_init() { sqlite3_exec(p->db, R"sql( |