I'm planning for a system to monitor performance in my scripts and business processes. This follows from another discussion
A new question on this issue.
In the interests of modularity, I am thinking of developing a single script that captures data and creates Performance Log records for all scripts or other monitored processes.
I Imagine creating this script and then nesting all monitored scripts within it as subscripts. Lets call this the 'shell script' as it encapsulates the functional scripts.
I am thinking this way because the first thing I need for monitoring is a start time (Beginning) and then I need to capture the end time (finish) for any given process to see how long it takes. SO my functional scripts need to sit within a start and end of a monitoring script/s . At least that's what I think.
I'm also concerned with modularity in all other domains of scripting.
So the functional parts (non monitoring) of any process are going to need context parameters. So far that's no worries using script parameters set up as list values passing field names etc.
But - my monitoring function is also contextual - (by record, script name, table, (maybe layout)).
So I'm going to need to pass parameters to the shell script to determine it's own context. But also information like
- The functional script name (subscript)
- The record id
- reference fields for values
- other data
As an example - one functional script I use calls a plugin and the script parameter I need to make this work dynamically (modularity) requires a list with 9 values.
Am I thinking about this the wrong way?
Should I just have my functional scripts each call 2 subscripts - one to get start values and one to get end values and build more parameter 'list' values to pass monitoring context to the two subscripts?
Welcome thoughts on this,