summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2023-01-15 22:41:52 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2023-01-15 22:57:00 -0500
commitd521020d2189dfe713f6051e00a65a3aa9e7e5e9 (patch)
tree69a3a395f45b2f9312979d36795de4b53012c0b4
parentd39fcf5c89004532d2e5ff8b9338d93e737b632a (diff)
downloadrockbox-d521020d2189dfe713f6051e00a65a3aa9e7e5e9.tar.gz
rockbox-d521020d2189dfe713f6051e00a65a3aa9e7e5e9.zip
[Feature] Add total entries to database info
show total database entries in debug>Database Info Change-Id: Ic22b6a032ae0ee23e0f38c0da6a9cf1433ba29e2
-rw-r--r--apps/debug_menu.c2
-rw-r--r--apps/tagcache.c1
-rw-r--r--apps/tagcache.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 070c08f4f6..e3274f5f2c 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1865,6 +1865,8 @@ static int database_callback(int btn, struct gui_synclist *lists)
1865 stat->ramcache ? "Yes" : "No"); 1865 stat->ramcache ? "Yes" : "No");
1866 simplelist_addline("RAM: %d/%d B", 1866 simplelist_addline("RAM: %d/%d B",
1867 stat->ramcache_used, stat->ramcache_allocated); 1867 stat->ramcache_used, stat->ramcache_allocated);
1868 simplelist_addline("Total entries: %d",
1869 stat->total_entries);
1868 simplelist_addline("Progress: %d%% (%d entries)", 1870 simplelist_addline("Progress: %d%% (%d entries)",
1869 stat->progress, stat->processed_entries); 1871 stat->progress, stat->processed_entries);
1870 simplelist_addline("Curfile: %s", 1872 simplelist_addline("Curfile: %s",
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 69a6eaade5..09dbc2b041 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -5084,6 +5084,7 @@ static int get_progress(void)
5084 5084
5085struct tagcache_stat* tagcache_get_stat(void) 5085struct tagcache_stat* tagcache_get_stat(void)
5086{ 5086{
5087 tc_stat.total_entries = current_tcmh.tch.entry_count;
5087 tc_stat.progress = get_progress(); 5088 tc_stat.progress = get_progress();
5088 tc_stat.processed_entries = processed_dir_count; 5089 tc_stat.processed_entries = processed_dir_count;
5089 5090
diff --git a/apps/tagcache.h b/apps/tagcache.h
index b3baba0f30..37298c7a69 100644
--- a/apps/tagcache.h
+++ b/apps/tagcache.h
@@ -85,6 +85,7 @@ struct tagcache_stat {
85 int ramcache_used; /* How much ram has been really used */ 85 int ramcache_used; /* How much ram has been really used */
86 int progress; /* Current progress of disk scan */ 86 int progress; /* Current progress of disk scan */
87 int processed_entries; /* Scanned disk entries so far */ 87 int processed_entries; /* Scanned disk entries so far */
88 int total_entries; /* Total entries in tagcache */
88 int queue_length; /* Command queue length */ 89 int queue_length; /* Command queue length */
89 volatile const char 90 volatile const char
90 *curentry; /* Path of the current entry being scanned. */ 91 *curentry; /* Path of the current entry being scanned. */