feat: add more perf counters to Server-Timing (#2983)
This commit is contained in:
@@ -22,8 +22,7 @@ spec =
|
||||
`shouldRespondWith`
|
||||
[json|[{"id":6,"name":"Oscorp","referee":3,"auditor":4,"manager_id":6}]|]
|
||||
{ matchStatus = 200
|
||||
, matchHeaders = [ matchContentTypeJson
|
||||
, matchHeaderPresent "Server-Timing"]
|
||||
, matchHeaders = matchContentTypeJson : map matchServerTimingHasTiming ["jwt", "plan", "query", "render"]
|
||||
}
|
||||
|
||||
it "works with post request" $
|
||||
@@ -33,8 +32,7 @@ spec =
|
||||
`shouldRespondWith`
|
||||
[json|[{"id":7,"name":"John","referee":null,"auditor":null,"manager_id":6}]|]
|
||||
{ matchStatus = 201
|
||||
, matchHeaders = [ matchContentTypeJson
|
||||
, matchHeaderPresent "Server-Timing"]
|
||||
, matchHeaders = matchContentTypeJson : map matchServerTimingHasTiming ["jwt", "plan", "query", "render"]
|
||||
}
|
||||
|
||||
it "works with patch request" $
|
||||
@@ -43,8 +41,7 @@ spec =
|
||||
`shouldRespondWith`
|
||||
""
|
||||
{ matchStatus = 204
|
||||
, matchHeaders = [ matchHeaderAbsent hContentType
|
||||
, matchHeaderPresent "Server-Timing" ]
|
||||
, matchHeaders = matchHeaderAbsent hContentType : map matchServerTimingHasTiming ["jwt", "plan", "query", "render"]
|
||||
}
|
||||
|
||||
it "works with put request" $
|
||||
@@ -54,7 +51,7 @@ spec =
|
||||
`shouldRespondWith`
|
||||
[json| [ { "name": "Go", "rank": 19 } ]|]
|
||||
{ matchStatus = 200
|
||||
, matchHeaders = [ matchHeaderPresent "Server-Timing" ]
|
||||
, matchHeaders = map matchServerTimingHasTiming ["jwt", "plan", "query", "render"]
|
||||
}
|
||||
|
||||
it "works with delete request" $
|
||||
@@ -64,8 +61,7 @@ spec =
|
||||
`shouldRespondWith`
|
||||
""
|
||||
{ matchStatus = 204
|
||||
, matchHeaders = [ matchHeaderAbsent hContentType
|
||||
, matchHeaderPresent "Server-Timing" ]
|
||||
, matchHeaders = matchHeaderAbsent hContentType : map matchServerTimingHasTiming ["jwt", "plan", "query", "render"]
|
||||
}
|
||||
|
||||
it "works with rpc call" $
|
||||
@@ -75,5 +71,5 @@ spec =
|
||||
`shouldRespondWith`
|
||||
[json|{"x": 1, "y": 2}|]
|
||||
{ matchStatus = 200
|
||||
, matchHeaders = [ matchHeaderPresent "Server-Timing" ]
|
||||
, matchHeaders = map matchServerTimingHasTiming ["jwt", "plan", "query", "render"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user