My current assignment at work deals with our in-house task system, which is largely responsible for executing operations and other work asynchronously from the usual HTTP request/response workflow. I want to present aggregate data and statistics about these tasks in a clear, useful manner.
Some kinds of tasks are parent tasks, where they delegate a large amount of work to a number of children that are each responsible for a chunk of that work. Consequently, these parent tasks tend to run very quickly, in the realm of 1-20 milliseconds. However, since the child tasks are actually doing work, they can take several seconds. That said, when we humans look at these tasks, we care more about whether all of a parent's children are done. In that regard, the explicit duration of a parent task is not as useful as the sum of durations for the children. A further wrinkle is that we have multiple task workers, so a handful of tasks can be done in parallel.
Here's an example I just made up on the spot (where Avg
and StdDev
are the mean and standard deviation of task durations):
Task | Count | Avg | StdDev
A 5 10 ms 3 ms
B 50 850 ms 40 ms
Here, each task of type A spawns 10 subtasks of type B. Additionally, let's assume that there are four workers so up to four tasks are executing concurrently, and subtasks execute in the same order that their parents do.
Hence, the mean total duration for a single task of type A, from when the parent is started to when all the children are finished, is probably roughly $10 + 850 * 10 / 4 = 2135$ milliseconds. However, I don't know if this is the best way to calculate the overall mean, and I have no idea what's best for overall standard deviation.
How can I decently estimate the overall mean and standard deviation of a set of tasks chosen from two different populations? The interpretation of "decent" is open but as a gut feeling, I would consider calculating an estimate within $\pm20\%$ of the true value as being "decent".