Skip to content

Instantly share code, notes, and snippets.

@StephanyBatista
Last active October 16, 2019 12:32
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 StephanyBatista/d747690e8774cc3d7b07be092a2a14e3 to your computer and use it in GitHub Desktop.
Save StephanyBatista/d747690e8774cc3d7b07be092a2a14e3 to your computer and use it in GitHub Desktop.
//Insert documentos
//Antes
union *
| where itemType == "request" and operation_Name has "POST /api/arquivistico/processos" and operation_Name has "/documentos"
| where timestamp > datetime(2019-08-05T00:00:00Z) and timestamp < datetime(2019-08-05T23:59:00Z)
| order by timestamp desc
| summarize count(duration)
//Antes
union *
| where itemType == "request" and operation_Name has "POST /api/arquivistico/processos" and operation_Name has "/documentos"
| where timestamp > datetime(2019-10-14T18:00:00Z)
| order by timestamp desc
| summarize count(duration)
//GET documentos
//Antes
union *
| where itemType == "request" and operation_Name has "GET /api/arquivistico/documentos/"
| where timestamp > datetime(2019-08-05T00:00:00Z) and timestamp < datetime(2019-08-05T23:59:00Z) and client_City == "Campo Grande"
| order by timestamp desc
| summarize avg(duration)
//Depois
union *
| where itemType == "request" and operation_Name has "GET /api/arquivistico/documentos/"
| where timestamp > datetime(2019-10-14T18:00:00Z)
| order by timestamp desc
| summarize avg(duration)
//GET processos
//Antes
union *
| where itemType == "request" and operation_Name == "GET /api/arquivistico/processos"
| where timestamp > datetime(2019-08-05T00:00:00Z) and timestamp < datetime(2019-08-05T23:59:00Z)
| order by timestamp desc
| summarize avg(duration)
//Depois
union *
| where itemType == "request" and operation_Name == "GET /api/arquivistico/processos"
| where timestamp > datetime(2019-10-14T18:00:00Z)
| order by timestamp desc
| summarize avg(duration)
--Consultas gerais
union *
| where itemType == "request" and (operation_Name has "PUT" or operation_Name has "POST") and operation_Name has "tramitacao" and operation_Name has "/parecer"
| summarize count(duration)
union *
| where itemType == "request" and operation_Name == "POST /api/arquivistico/processos"
| summarize avg(duration)
union *
| where operation_Id == "54760f5641ff324db45bd6004b864bcd"
| sort by duration desc
union *
| where type == "SQL" and data has "VersaoParaVisualizacao" and data has "select"
| summarize avg(duration)
union *
| where itemType == "dependency" and name has "GET /digix/papelzero-homolog/"
| summarize avg(duration)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment