Observing subprocess execution times and memory usages, should it be a Metric? or an Event?

31 views Asked by At

I have an application that runs various subprocesses dynamically during its runtime. I aim to create graphs depicting the execution time of these subprocesses and their corresponding memory usage. However, as the subprocesses can vary based on input, generating a separate graph for each subprocess is not a desirable approach.

I'm currently exploring the most appropriate method for gathering this information. I initially experimented with using metrics, but it seems suboptimal for tracking the execution time since metrics are typically aggregated, and execution time is more of an individual event for each subprocess.

On the other hand, monitoring memory usage per subprocess seems like a suitable use case for metrics. However, I don't want to create a separate metric table for each subprocess. Instead, I'm considering aggregating memory usage system-wide and possibly representing it as a series of events, with a few events recorded for each subprocess.

I would appreciate some guidance on the best practices for addressing this challenge, specifically in terms of measuring the application's performance based on subprocess memory usage and execution times.

0

There are 0 answers