Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ninmonkey/6219e741dc24cc217218270d60c1acce to your computer and use it in GitHub Desktop.
Save ninmonkey/6219e741dc24cc217218270d60c1acce to your computer and use it in GitHub Desktop.
Testing if Query Diagnostics include sleeping as the full duration for that step. Yes.
let
/* testing delays in query diagnostics */
seconds = 5,
resp1 = [
Bytes = Web.Contents( "https://httpbin.org", [ RelativePath = "/links/3/1" ] ),
Who = Diagnostics.ActivityId()
],
resp2 =
Function.InvokeAfter(
() => [
Bytes = Web.Contents( "https://httpbin.org", [ RelativePath = "/links/2/4" ] ),
Who = Diagnostics.ActivityId()
],
#duration(0, 0, 0, seconds)
),
Final = Table.FromRecords( { [
SameActivity =
resp1[Who] = resp2[Who],
str1 = Text.FromBinary( resp1[Bytes] ),
str2 = Text.FromBinary( resp2[Bytes] ),
resp1 = resp1, resp2 = resp2
] } )
in
Final
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment