apollo-tracing
Advanced tools
Comparing version 0.2.0-beta.0 to 0.2.0-beta.1
@@ -25,3 +25,4 @@ import { GraphQLResolveInfo } from 'graphql'; | ||
private resolverCalls; | ||
requestDidStart(): () => void; | ||
requestDidStart(): void; | ||
executionDidStart(): () => void; | ||
willResolveField(_source: any, _args: { | ||
@@ -28,0 +29,0 @@ [argName: string]: any; |
@@ -9,5 +9,13 @@ "use strict"; | ||
TracingExtension.prototype.requestDidStart = function () { | ||
var _this = this; | ||
this.startWallTime = new Date(); | ||
this.startHrTime = process.hrtime(); | ||
}; | ||
TracingExtension.prototype.executionDidStart = function () { | ||
var _this = this; | ||
// It's a little odd that we record the end time after execution rather than | ||
// at the end of the whole request, but because we need to include our | ||
// formatted trace in the request itself, we have to record it before the | ||
// request is over! It's also odd that we don't do traces for parse or | ||
// validation errors, but runQuery doesn't currently support that, as | ||
// format() is only invoked after execution. | ||
return function () { | ||
@@ -14,0 +22,0 @@ _this.duration = process.hrtime(_this.startHrTime); |
{ | ||
"name": "apollo-tracing", | ||
"version": "0.2.0-beta.0", | ||
"version": "0.2.0-beta.1", | ||
"description": "Collect and expose trace data for GraphQL requests", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13675
217