npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

stream-log-stats

v3.0.2

Published

Prints statistics from the incoming web log stream to the console

Downloads

186,117

Readme

view on npm npm module downloads Dependency Status js-standard-style

stream-log-stats

Presents a dynamic view of the incoming common log format data to the console. The view is refreshed as new data streams in.

Installation

Mac / Linux users may need to run the install commands with sudo.

As a library

Move into your project directory then run:

$ npm install stream-log-stats --save

Example

var connect = require('connect')
var morgan = require('morgan') // logging middleware
var http = require('http')
var logStats = require('stream-log-stats')

var app = connect()
app.use(morgan({ stream: logStats() }))

var server = http.createServer(app).listen(8000)

As a command-line app

From any directory run the following:

$ npm install -g stream-log-stats

Now the log-stats utility is installed. Pipe in a common-log-format log to view the statistics.

Example

This example pipes the output from local-web-server into log-stats.

$ ws -f common | log-stats
serving at http://localhost:8000
Clients  Requests  Transferred
1        48        2.79 MB

Extension          Requests  Transferred
.jpg               16        690.24 KB
.woff              7         1.39 MB
.css               6         128.84 KB
.js                4         311.44 KB
.png               3         16.93 KB
.3                 3         130.17 KB
.ttf               3         63.71 KB
.map               3         35.81 KB
.html              2         29.59 KB
<none>             1         19.96 KB

Resource                                                   Requests  Transferred
/_gh-pages/assets/images/75lb.png                          3         16.93 KB
...t-awesome-4.0.3/fonts/fontawesome-webfont.woff?v=4.0.3  3         130.17 KB
/_gh-pages/assets/fonts//Lombardic.ttf                     3         63.71 KB
/_gh-pages/assets/fonts/PTSansWeb/PTS76F_W.woff            3         535.03 KB
...s/assets/fonts/font-awesome-4.0.3/css/font-awesome.css  3         63.45 KB
/_gh-pages/assets/styles/screen.css                        3         65.39 KB
/_gh-pages/assets/styles/screen.css.map                    3         35.81 KB
/_gh-pages/assets/images/thumb/present-continuous.jpg      2         49.53 KB
/_gh-pages/assets/images/thumb/past-simple.jpg             2         82.27 KB
/_gh-pages/assets/fonts/PTSansWeb/PTS75F_W.woff            2         465.52 KB

© 2015-19 Lloyd Brookes <[email protected]>.