Created
January 31, 2019 07:56
-
-
Save Geertvdc/548512a03a39de03104ff90e730d8727 to your computer and use it in GitHub Desktop.
Calculation times in Log Analytics query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let today = dependencies | |
| where timestamp between( now(-1d) .. now() ) | |
| where name == "CalculationCycle" | |
| project value , timestamp, hour=datepart("Hour",timestamp) | |
| summarize avg(value) by bin(hour,1) | |
| sort by hour asc; | |
let lastmonth = dependencies | |
| where timestamp between( now(-30d) .. now(-1d)) | |
| where name == "CalculationCycle" | |
| project value , timestamp, hour=datepart("Hour",timestamp) | |
| summarize percentiles(value, 90) by bin(hour,1) | |
| sort by hour asc; | |
today | join kind= inner (lastmonth) on hour | |
| project hour, avg_value , percentile_value_90 | |
| sort by hour asc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment