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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rtcstats/rtcstats-features

v2.2.0

Published

This is part of the [monorepo](https://github.com/rtcstats/rtcstats) for rtcstats-js (clientside monitoring), rtcstats-server (serverside dump collection) and the updated dump-importer (supporting rtcstats and webrtc-internals formats).

Readme

This is part of the monorepo for rtcstats-js (clientside monitoring), rtcstats-server (serverside dump collection) and the updated dump-importer (supporting rtcstats and webrtc-internals formats).

It is part of a bigger offering that includes rtcstats.com, the hosted WebRTC observability service that reads collected dumps and returns Observations, an Experience Score, and a plain-English AI summary of what went wrong on the call.

Feature extraction

This package contains feature extraction for peerconnection API traces and getStats data. There are four types of features:

  • Features related to server-side metadata such as location.
  • Features related to the client as a whole, e.g. calls to getUserMedia and errors.
  • Features related to a particular RTCPeerConnection and the API calls happening to it.
  • Features related to a inbound or outbound MediaStreamTrack, mostly based on getStats API.

Running (from the monorepo root)

npm i
node bin/rtcstats-features.js

will query the database for a unprocessed dumps, download it, extract the features and insert the features into the database. If no unprocessed dumps are found, the process waits five seconds before trying again.

The database and storage are taken from the toplevel config/ directory, depending on NODE_ENV.

Database structure

The feature extraction polls for new records from the rtcstats-server table for features that have not yet been processed. The associated dump is fetched for local processing and features are extracted.

There is a 1:1 relationship between the features_metadata and the rtcstats-table entry. The main table is rtcstats-server, which contains the metadata for each dump, identified by a unique id.

The extracted features are stored in a set of tables:

  • features_metadata: This table contains high-level metadata about the dump, such as the URL, user agent, and the number of peer connections. It has a foreign key dump_id that references the id in the rtcstats-server table.
  • features_client: This table contains information about the client environment, such as hardware concurrency and screen resolution. It has a foreign key dump_id that references the id in the features_metadata table.
  • features_connection: This table contains features related to a single RTCPeerConnection. It has a foreign key dump_id that references the id in the features_metadata table.
  • features_track: This table contains features related to a single media track within a peer connection. It has a foreign key connection_id that references the id in the features_connection table.

This structure allows for a dump in rtcstats-server to have one features_metadata entry, which in turn is associated with one features_client entry, multiple features_connection entries, and each of those connections can have multiple features_track entries. This is visualized below:

  +-------------------+
  | rtcstats-server   |
  |-------------------|
+-+ id (PK)           |
| +-------------------+
|
| (1-to-1)
|
| +-------------------+
| | features_metadata |
| |-------------------|
| | id (PK)           +-+----------------------------------+
+-+ dump_id (FK)      | |                                  |
  +-------------------+ | (1-to-1)             (1-to-many) |
                        |                                  |
  +-------------------+ |          +---------------------+ |
  | features_client   | |          | features_connection | |
  |-------------------| |          |---------------------| |
  | id (PK)           | |        +-+ id (PK)             | |
  | dump_id (FK)      +-+        | | dump_id (FK)        +-+
  +-------------------+          | +---------------------+
                                 |
                                 | +---------------------+
                                 | | features_track      |
                                 | |---------------------|
                                 | | id (PK)             |
                                 +-+ connection_id (FK)  |
                                   +---------------------+

Given a serverside id (or a blob_url) the associated features can be queried using

select * from "rtcstats-server" as server
    join features_metadata on features_metadata.dump_id = server.id
    join features_client on features_client.dump_id = features_metadata.id
    join features_connection on features_connection.dump_id = features_metadata.id
    join features_track on features_track.connection_id = features_connection.id
    where server.id = ${id}

Versioning

This package follows semantic versioning, with the database schema counting as part of its public interface:

  • Major: breaking or unsafe database changes, e.g. dropping or renaming a column, changing a column's type, or changing the meaning of an existing feature. Consumers of the feature tables may need to update their queries.
  • Minor: new features, i.e. new columns added by a migration. Several features may be batched into a single minor release.
  • Patch: bugfixes that change neither the schema nor the meaning of a feature.

Bump the version from the repository root:

npm version minor -w packages/rtcstats-features