app: add active-thread variable to the dashboard

Add an active-thread variable to the dashboard's misc group,
showing the number of active worker threads.  See commit
gegl@6a3a6314d4d4cd668e0f6164afc0fde8b9c7c001.

(cherry picked from commit 2cc77e6927)
This commit is contained in:
Ell 2019-07-20 23:51:42 +03:00
parent 91c20c783a
commit 65fb2859c4

View file

@ -139,6 +139,7 @@ typedef enum
/* misc */
VARIABLE_MIPMAPED,
VARIABLE_ACTIVE_THREADS,
VARIABLE_ASYNC_RUNNING,
VARIABLE_TILE_ALLOC_TOTAL,
VARIABLE_SCRATCH_TOTAL,
@ -691,6 +692,15 @@ static const VariableInfo variables[] =
.data = "zoom-total"
},
[VARIABLE_ACTIVE_THREADS] =
{ .name = "active-threads",
.title = NC_("dashboard-variable", "Threads"),
.description = N_("Number of active worker threads"),
.type = VARIABLE_TYPE_INTEGER,
.sample_func = gimp_dashboard_sample_gegl_stats,
.data = "active-threads"
},
[VARIABLE_ASYNC_RUNNING] =
{ .name = "async-running",
.title = NC_("dashboard-variable", "Async"),
@ -928,6 +938,9 @@ static const GroupInfo groups[] =
{ .variable = VARIABLE_MIPMAPED,
.default_active = TRUE
},
{ .variable = VARIABLE_ACTIVE_THREADS,
.default_active = TRUE
},
{ .variable = VARIABLE_ASYNC_RUNNING,
.default_active = TRUE
},