aboutsummaryrefslogtreecommitdiff
path: root/src/im-sandbox.h
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-11-15 10:33:47 +0100
committerThomas White <taw@physics.org>2018-11-15 10:33:47 +0100
commit6c18490d12ad6837636b54afe97641513042f95d (patch)
tree0a8df2d764264d70705de1127208eeb0e5110012 /src/im-sandbox.h
parent5184da5ca9ce34ddd3a291cf371a63ad1fa1f77d (diff)
indexamajig: Name and shame slow processing stages
Diffstat (limited to 'src/im-sandbox.h')
-rw-r--r--src/im-sandbox.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/im-sandbox.h b/src/im-sandbox.h
index 1412d199..e5f3422b 100644
--- a/src/im-sandbox.h
+++ b/src/im-sandbox.h
@@ -49,6 +49,10 @@ struct sb_shm;
/* Maximum length of an event ID including serial number */
#define MAX_EV_LEN (1024)
+/* Maximum length of a task ID, e.g. indexing:xgandalf.
+ * NB If changing this, also update the value in index.c */
+#define MAX_TASK_LEN (32)
+
/* Maximum number of workers */
#define MAX_NUM_WORKERS (1024)
@@ -61,6 +65,7 @@ struct sb_shm
char queue[QUEUE_SIZE][MAX_EV_LEN];
int no_more;
char last_ev[MAX_NUM_WORKERS][MAX_EV_LEN];
+ char last_task[MAX_NUM_WORKERS][MAX_TASK_LEN];
int pings[MAX_NUM_WORKERS];
time_t time_last_start[MAX_NUM_WORKERS];
int warned_long_running[MAX_NUM_WORKERS];
@@ -73,6 +78,8 @@ struct sb_shm
extern char *create_tempdir(const char *temp_location);
+extern void set_last_task(char *lt, const char *task);
+
extern void create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
int config_basename, FILE *fh, Stream *stream,
const char *tempdir, int serial_start);