GitHub - szmarczak/http-timer: Timings for HTTP requests
source link: https://github.com/szmarczak/http-timer
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
http-timer
Timings for HTTP requests
Inspired by the request
package.
Usage
'use strict'; const https = require('https'); const timer = require('@szmarczak/http-timer'); const request = https.get('https://httpbin.org/anything'); const timings = timer(request); request.on('response', response => { response.on('data', () => {}); // Consume the data somehow response.on('end', () => { console.log(timings); }); }); // { start: 1535183088427, // socket: 1535183088429, // lookup: 1535183088465, // connect: 1535183088602, // response: 1535183089049, // end: 1535183089050, // phases: // { wait: 2, // dns: 36, // firstByte: 447, // download: 1, // tcp: 137, // total: 623 } }
License
MIT
Recommend
-
234
Requests Requests is a simple, yet elegant, HTTP library. >>> import requests >>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass')) >>> r.status_c...
-
33
README.md http2-wrapper (under heavy development) Use HTTP2 the same way like HTTP1 Usage
-
5
Calculating Coronavirus Timings with Excel Following on from my article on working with public coronavirus data where I calculated the origina...
-
5
Understanding Execution Plan Operator Timings SQL Server 2014 SP2 and later produce runtime (“actual”) execution plans that can include elapsed time and CPU usage
-
2
CodeChef short contests timings are changing CodeChef short contests timings are changing
-
4
TimeThis! - Simple timings for code blocks (Fun with IDisposable) 14 December 2021 This p...
-
3
rustc typeck timings Oct 20, 2015 (Following up on my comment on the rust IDE rfc) Here are some performance num...
-
4
HMS Community Posted on Mar 29
-
2
Minimum chairs for group timingsGiven an integer N representing the total size of groups S, their entry T1 and exit timings T2. This means that grou...
-
5
Home » Games » Fortnite Chapter 4 Season 3 end date and Season 4 release timings
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK