Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MasayukiOzawa/164ca6f5f5ea5162847f31f43026d750 to your computer and use it in GitHub Desktop.
Save MasayukiOzawa/164ca6f5f5ea5162847f31f43026d750 to your computer and use it in GitHub Desktop.
Perf
| where Computer == "ubuntu"
| where CounterName contains "Batch"
| sort by TimeGenerated asc nulls last
| extend PrevCounterValue = prev(CounterValue, 1, 0)
| extend PrevTimeGenerated = prev(TimeGenerated, 1, 0)
| extend TimeInterval = case(
PrevCounterValue == 0, toreal(0),
round(datetime_diff("Second", TimeGenerated, PrevTimeGenerated))
)
| extend BRPS = case(
TimeInterval == 0 , toreal(0),
PrevCounterValue == 0 , toreal(0),
CounterValue - PrevCounterValue <= 0 , toreal(0),
(CounterValue - PrevCounterValue)
)
| extend BRPS_Interval = case(
TimeInterval == 0 , toreal(0),
PrevCounterValue == 0 , toreal(0),
CounterValue - PrevCounterValue <= 0 , toreal(0),
(CounterValue - PrevCounterValue) / TimeInterval
)
| where TimeInterval >= 15
| project TimeGenerated_JPN = datetime_add("Hour", 9, TimeGenerated) , BRPS_Interval,
Computer , TimeInterval, BRPS
| render timechart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment