0

hi I'm trying to group some values related to a run Id by that run ID.

so what i have is:

AzureDiagnostics
| where resource_workflowName_s =="RABE_REST_CARUS_V2"
| where resource_actionName_s  != "" 
   and resource_actionName_s == "Initialize_variable" 
   or resource_actionName_s == "Compose" 
   or resource_actionName_s == "RabeValidationCarusV2Test" 
   or resource_actionName_s == "HTTP"
| where status_s  == "Succeeded" 
| extend Duration = iff(isnotempty(endTime_t), todouble(endTime_t - startTime_t ) / 10000000, double(null))
| project RunId = resource_runId_s, Actions = resource_actionName_s , Duration

And i get this as a result:

enter image description here

what i want to to is sum the duration of the actions related to one RunID what i have now is one action per runID and the duration of it...

Hope that makes sense?

Community
  • 1
  • 1
H4p7ic
  • 1,669
  • 2
  • 32
  • 61

1 Answers1

0

Found the answer:

AzureDiagnostics
| where resource_workflowName_s =="RABE_REST_CARUS_V2"
| where resource_actionName_s != "" 
    and resource_actionName_s == "Initialize_variable" 
    or resource_actionName_s == "Compose" 
    or resource_actionName_s == "RabeValidationCarusV2Test" 
    or resource_actionName_s == "HTTP"
| where status_s  == "Succeeded" 
| extend Duration = iff(isnotempty(endTime_t), todouble(endTime_t - startTime_t ) / 10000000, double(null))
| project RunId = resource_runId_s, Actions = toobject(resource_actionName_s) , Duration
| summarize Actions = makeset(Actions), Durations = makeset(Duration), DurationSum = sum(Duration) by RunId 
| where DurationSum > 15
H4p7ic
  • 1,669
  • 2
  • 32
  • 61