mercredi 31 juillet 2019

Latency diagnostic of the data flow from hardware device to UI

For existing software application, I need to include new diagnostic system for Latency of the data flow between the input of the of data until the output. What pattern or strategy I should use to get proper diagnostic?

We have application that include 4 main pieces: 1. Hardware Device 2. Data repository 3. Business Logic 4. UI

Device is sending data constantly. Software collect the data, process, validate, present on the chart and store it in database.

What I need is the way I could track each sample of the data from the input until the output to calculate the time between the start and the end. You should consider that data structure could be replaced from class to class. For instance, at the beginning the data is going to be part of the class DeviceData and at the end as ChartData. Data flow usually used by events and send between classes as Invoke.

What would be the best solution to inject additional code that would uniquely identify the data and keep the track of the time for each samples and their transformation.

Currently, what we do usually is adding logging information for each function which is the part of the flow and manually we try to identify the correct samples to figure out how much time it takes, which is too complicated. There a log of samples every even second.

The expected result would be possibility to get final results such as: Sample started at timeStart Function X - takes duration1 Function Y - takes duration2 …. Sample presented on chart timeEnd

Aucun commentaire:

Enregistrer un commentaire