elastic-apm-http-client
Advanced tools
Comparing version 9.8.0 to 9.8.1
# elastic-apm-http-client changelog | ||
## v9.8.1 | ||
- perf: eliminate encodeObject stack and faster loop in `_writeBatch` | ||
([#159](https://github.com/elastic/apm-nodejs-http-client/pull/159)) | ||
- test: start testing with node 16 | ||
([#157](https://github.com/elastic/apm-nodejs-http-client/pull/157)) | ||
## v9.8.0 | ||
@@ -4,0 +11,0 @@ |
16
index.js
@@ -420,6 +420,2 @@ 'use strict' | ||
function encodeObject (obj) { | ||
return this._encode(obj.chunk, obj.encoding) | ||
} | ||
// Write a batch of events (excluding specially handled "flush" events) to | ||
@@ -429,3 +425,9 @@ // the stream chopper. | ||
const t = process.hrtime() | ||
const chunk = objs.map(encodeObject.bind(this)).join('') | ||
// XXX perf: elims `encodeObject` stack frame; faster loop | ||
const chunks = [] | ||
for (var i = 0; i < objs.length; i++) { | ||
const obj = objs[i] | ||
chunks.push(this._encode(obj.chunk, obj.encoding)) | ||
} | ||
const chunk = chunks.join('') | ||
const encodeTimeMs = deltaMs(t) | ||
@@ -1078,6 +1080,2 @@ | ||
if (opts.cloudMetadata) { | ||
payload.cloud = Object.assign({}, opts.cloudMetadata) | ||
} | ||
return payload | ||
@@ -1084,0 +1082,0 @@ } |
{ | ||
"name": "elastic-apm-http-client", | ||
"version": "9.8.0", | ||
"version": "9.8.1", | ||
"description": "A low-level HTTP client for communicating with the Elastic APM intake API", | ||
@@ -14,3 +14,2 @@ "main": "index.js", | ||
"scripts": { | ||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && (codecov || echo 'warning: ignoring codecov failure')", | ||
"test": "standard && nyc tape \"test/*.js\"" | ||
@@ -35,3 +34,2 @@ }, | ||
"devDependencies": { | ||
"codecov": "^3.6.1", | ||
"ndjson": "^1.5.0", | ||
@@ -38,0 +36,0 @@ "nyc": "^14.1.1", |
@@ -6,3 +6,2 @@ # elastic-apm-http-client | ||
[![Build Status in Jenkins](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-nodejs%2Fapm-nodejs-http-client-mbp%2Fmaster)](https://apm-ci.elastic.co/job/apm-agent-nodejs/job/apm-nodejs-http-client-mbp/job/master/) | ||
[![codecov](https://img.shields.io/codecov/c/github/elastic/apm-nodejs-http-client.svg)](https://codecov.io/gh/elastic/apm-nodejs-http-client) | ||
@@ -9,0 +8,0 @@ A low-level HTTP client for communicating with the Elastic APM intake |
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
5
73097
367