![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
org.webjars.npm:szmarczak__http-timer
Advanced tools
Timings for HTTP requests
Inspired by the request
package.
NPM:
npm install @szmarczak/http-timer
Yarn:
yarn add @szmarczak/http-timer
Note:
- The measured events resemble Node.js events, not the kernel ones.
- Sending a chunk greater than
highWaterMark
will result in invalidupload
andresponse
timings. You can avoid this by splitting the payload into smaller chunks.
const https = require('https');
const timer = require('@szmarczak/http-timer');
const request = https.get('https://httpbin.org/anything');
timer(request);
request.once('response', response => {
response.resume();
response.once('end', () => {
console.log(response.timings); // You can use `request.timings` as well
});
});
// {
// start: 1572712180361,
// socket: 1572712180362,
// lookup: 1572712180415,
// connect: 1572712180571,
// upload: 1572712180884,
// response: 1572712181037,
// end: 1572712181039,
// error: undefined,
// abort: undefined,
// phases: {
// wait: 1,
// dns: 53,
// tcp: 156,
// request: 313,
// firstByte: 153,
// download: 2,
// total: 678
// }
// }
Returns: Object
Note: The time is a number
representing the milliseconds elapsed since the UNIX epoch.
start
- Time when the request started.socket
- Time when a socket was assigned to the request.lookup
- Time when the DNS lookup finished.connect
- Time when the socket successfully connected.secureConnect
- Time when the socket securely connected.upload
- Time when the request finished uploading.response
- Time when the request fired response
event.end
- Time when the response fired end
event.error
- Time when the request fired error
event.abort
- Time when the request fired abort
event.phases
wait
- timings.socket - timings.start
dns
- timings.lookup - timings.socket
tcp
- timings.connect - timings.lookup
tls
- timings.secureConnect - timings.connect
request
- timings.upload - (timings.secureConnect || timings.connect)
firstByte
- timings.response - timings.upload
download
- timings.end - timings.response
total
- (timings.end || timings.error || timings.abort) - timings.start
If something has not been measured yet, it will be undefined
.
MIT
FAQs
WebJar for @szmarczak/http-timer
We found that org.webjars.npm:szmarczak__http-timer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.