Fix issues. (#58)
* Fix new(RestClientRef) declaration. * Fix metrics name issue.
This commit is contained in:
parent
eee1f7ad04
commit
cb9353acd5
|
@ -169,12 +169,12 @@ proc new*(t: typedesc[RestClientRef],
|
|||
bufferSize: int = 4096,
|
||||
userAgent = PrestoIdent,
|
||||
socketFlags: set[SocketFlags] = {}
|
||||
): RestResult[RestClientRef] =
|
||||
): RestClientRef =
|
||||
let session = HttpSessionRef.new(httpFlags, maxRedirections, connectTimeout,
|
||||
headersTimeout, bufferSize, maxConnections,
|
||||
idleTimeout, idlePeriod, socketFlags)
|
||||
ok(RestClientRef(session: session, address: address, agent: userAgent,
|
||||
flags: flags))
|
||||
RestClientRef(session: session, address: address, agent: userAgent,
|
||||
flags: flags)
|
||||
|
||||
proc new*(t: typedesc[RestClientRef],
|
||||
ta: TransportAddress,
|
||||
|
|
|
@ -69,7 +69,7 @@ when defined(metrics):
|
|||
endpoint = $route.routePath
|
||||
icode = toInt(code)
|
||||
scode = Base10.toString(uint64(toInt(code)))
|
||||
presto_client_response_status_count.inc(1, @[endpoint, scode])
|
||||
presto_server_response_status_count.inc(1, @[endpoint, scode])
|
||||
|
||||
proc processStatusMetrics(route: RestRoute, code: HttpCode,
|
||||
duration: Duration) =
|
||||
|
|
Loading…
Reference in New Issue