All Projects â†’ szmarczak â†’ Http Timer

szmarczak / Http Timer

Licence: mit
🕐 Performance timings for HTTP requests

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Http Timer

Schedule
Schedule timing task in Swift using a fluent API. (A friendly alternative to Timer)
Stars: ✭ 1,749 (+1021.15%)
Mutual labels:  timer
Sitereliabilityengineering
Notes on Site Reliability Engineering. Leave a 🌟 if you found this useful!
Stars: ✭ 144 (-7.69%)
Mutual labels:  https
Travianz Legacy
Join our Discord Server: https://discordapp.com/invite/9fbJKP9 | New repo: https://github.com/iopietro/Travianz
Stars: ✭ 150 (-3.85%)
Mutual labels:  timer
Httpserver
Http server is written on C++14 language. Dynamic libraries act as applications for the server (*.so - linux, *.dll - windows).
Stars: ✭ 141 (-9.62%)
Mutual labels:  https
Nuster
A high performance HTTP proxy cache server and RESTful NoSQL cache server based on HAProxy
Stars: ✭ 1,825 (+1069.87%)
Mutual labels:  https
Siris
DEPRECATED: The community driven fork of Iris. The fastest web framework for Golang!
Stars: ✭ 146 (-6.41%)
Mutual labels:  https
Speed Measure Webpack Plugin
⏱ See how fast (or not) your plugins and loaders are, so you can optimise your builds
Stars: ✭ 1,980 (+1169.23%)
Mutual labels:  timer
Launchbar
LaunchBar Actions
Stars: ✭ 155 (-0.64%)
Mutual labels:  timer
Httpp
Micro http server and client written in C++
Stars: ✭ 144 (-7.69%)
Mutual labels:  https
Timer App
A simple Timer app for Mac
Stars: ✭ 2,047 (+1212.18%)
Mutual labels:  timer
Amazing Time Picker
Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material
Stars: ✭ 142 (-8.97%)
Mutual labels:  timer
Web Development Articles
Monthly Series - Top 10 Web Development Articles
Stars: ✭ 143 (-8.33%)
Mutual labels:  https
Awesome Http Benchmark
HTTP(S) benchmark tools, testing/debugging, & restAPI (RESTful)
Stars: ✭ 2,236 (+1333.33%)
Mutual labels:  https
Hoverfly
Lightweight service virtualization/API simulation tool for developers and testers
Stars: ✭ 1,814 (+1062.82%)
Mutual labels:  https
Pomd
🍅 A good old cli based Pomodoro timer with native notifications
Stars: ✭ 151 (-3.21%)
Mutual labels:  timer
Letsencrypt Zimbra
Files to automate the deploy of letsencrypt certificates to Zimbra
Stars: ✭ 138 (-11.54%)
Mutual labels:  https
Co
Art of C++. Flag, logging, unit-test, json, go-style coroutine and more.
Stars: ✭ 2,264 (+1351.28%)
Mutual labels:  https
Ects
Elastic Crontab System įŽ€å•æ˜“į”¨įš„分布åŧåŽšæ—ļäģģåŠĄįŽĄį†įŗģįģŸ
Stars: ✭ 156 (+0%)
Mutual labels:  timer
Bhoptimer
A bunnyhop timer plugin for Counter-Strike: Source, Counter-Strike: Global Offensive and Team Fortress 2.
Stars: ✭ 151 (-3.21%)
Mutual labels:  timer
Global Agent
Global HTTP/HTTPS proxy agent configurable using environment variables.
Stars: ✭ 146 (-6.41%)
Mutual labels:  https

http-timer

Timings for HTTP requests

Build Status Coverage Status install size

Inspired by the request package.

Installation

NPM:

npm install @szmarczak/http-timer

Yarn:

yarn add @szmarczak/http-timer

Usage

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
//   }
// }

API

timer(request)

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.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].