I have telemetry for builds where some builds were started at the same time. Here is the query and the resulting graph:
AllBuilds
| project buildDef, startTime, result, runSeconds, runDuration, buildNumber
| where buildDef == 'dayforce-PR-AzureTest'
and startTime >= todatetime('2021-11-27 04:27')
and startTime < todatetime('2021-12-03 21:34')
and result == 'succeeded'
| project startTime, minutes = runSeconds / 60, runDuration, buildNumber
| render columnchart
The spikes represent the builds that fell on the same time. Their build times are added, which is not what I want. I would like to average them instead. Ideally, I prefer keeping both values, but since they fall on the same time exactly I am not sure if this is possible.
I tried adding with (accumulate=false)
, but it does not seem to bear any effect.
If I understand correctly, you could try using the avg()
aggregation function:
AllBuilds
| where buildDef == 'dayforce-PR-AzureTest'
and startTime >= todatetime('2021-11-27 04:27')
and startTime < todatetime('2021-12-03 21:34')
and result == 'succeeded'
| summarize avg(runDuration) by bin(startTime, 1h)
| render timechart