This PR fixes the collector_duration_seconds metric measurement.
In the original code, the metric value is calculated right after the collector's goroutines started, as the wg.Wait happens only after RedfishCollector.Collect returns.
So the collector_duration_seconds's value was always in the order of milliseconds, even though the goroutines took 10's of seconds to return.
This PR fixes the collector_duration_seconds metric measurement.
In the original code, the metric value is calculated right after the collector's goroutines started, as the
wg.Wait
happens only afterRedfishCollector.Collect
returns. So the collector_duration_seconds's value was always in the order of milliseconds, even though the goroutines took 10's of seconds to return.