Graph how long a job takes


I need is observe how long it takes to complete the execution of a particular mssql query. The query is executed once every hour, and I want to graph that for say a period of ten days.
The query is up and running using sql_exporter and prometheus gets the results and correctly graphs it, but that’s not what I need.

I’d be grateful for any hints.
Best regards.

Anybody on this?

do a time before the start, then a time after, subtract giving you duration, then store the duration.
you can then graph that.