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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@monitor-sdk/performance

v0.1.8

Published

性能监控

Downloads

1

Readme

@monitor-sdk/performance

English

浏览器性能监控sdk

可监控以下指标

  • basic
    • dnsSearch: DNS 解析耗时
    • tcpConnect: TCP 连接耗时
    • sslConnect: SSL安全连接耗时
    • request: TTFB 网络请求耗时
    • response: 数据传输耗时
    • parseDomTree: DOM 解析耗时
    • resource: 资源加载耗时
    • domReady: DOM Ready
    • httpHead: http 头部大小
    • interactive: 首次可交互时间
    • complete: 页面完全加载
    • redirect: 重定向次数
    • redirectTime: 重定向耗时
    • duration
    • fp: 渲染出第一个像素点,白屏时间
    • fcp: 渲染出第一个内容,首屏结束时间
  • fmp(暂未支持)
    • fmp: 有意义内容渲染时间
  • fps(暂未支持)
    • fps: 刷新率
  • vitals(暂未支持)
    • lcp: 最大内容渲染时间,2.5s内
    • fid: 交互性能,应小于 100ms
    • cls: 视觉稳定性,应小于 0.1
  • resource
    • resource: 页面资源加载耗时

Options

|配置名称|类型|是否必填|描述|默认值|可选值| |-|-|-|-|-|-| |performancOff|Array|否|关闭 performance 个别功能|[]|basic/fmp/fps/vitals/resource|

Usage

cdn

<script src="[performance-dist]/performance.iife.js"></script>
<script>
    window.__MONITOR_OPTIONS__ = {
        dsn: {
            projectId: 'dsdsdsdsdd5d5s5ds5ds5',
            reportUrl: 'localhost:8888/log/upload'
        },
        plugins: [
            MONITOR_PERFORMANCE(),
        ]
    };
</script>
<script async src="/browser-dist/browser.iife.js"></script>

npm

import monitor from "@monitor-sdk/browser";
import performancePlugin from "@monitor-sdk/performance";
monitor({
    dsn: {
        host: 'localhost:8888',
        init: '/project/init',
        upload: '/log/upload'
    },
    plugins: [
        performancePlugin(),
    ]
});