All Projects → tjuking → performance-timing

tjuking / performance-timing

Licence: other
performance-timing.js利用HTML5的navigation timing API进行前端性能数据采集,是性能监控平台搭建的利器

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to performance-timing

lighthouse-chromium-alpine-docker
Run Google's Lighthouse headless in the background
Stars: ✭ 16 (-71.43%)
Mutual labels:  performance-analysis
PerfAvore
Rule based performance analysis and monitoring tool for dotnet written in F#.
Stars: ✭ 12 (-78.57%)
Mutual labels:  performance-analysis
pyfbi
pyFBI enables a necessary and sufficient profiling and visualization
Stars: ✭ 28 (-50%)
Mutual labels:  performance-analysis
performance-node
Performance for Node.js
Stars: ✭ 17 (-69.64%)
Mutual labels:  performance-analysis
perf counter
A dedicated performance counter for Cortex-M systick. It shares the SysTick with users' original SysTick function without interfere it. This library will bring new functionalities, such as performance counter, delay_us and clock() service defined in time.h
Stars: ✭ 197 (+251.79%)
Mutual labels:  performance-analysis
aws-python-utilities
Python utilities for AWS related tasks.
Stars: ✭ 34 (-39.29%)
Mutual labels:  performance-analysis
powa-archivist
powa-archivist: the powa PostgreSQL extension
Stars: ✭ 48 (-14.29%)
Mutual labels:  performance-analysis
performance-budget-plugin
Perfromance budget plugin for Webpack (https://webpack.js.org/)
Stars: ✭ 65 (+16.07%)
Mutual labels:  performance-analysis
Probe
Probe is a web GUI application with for Hyperledger Fabric maintainer, user, research to find the best block config logic for specific chain-code.
Stars: ✭ 29 (-48.21%)
Mutual labels:  performance-analysis
perf-tools
A collection of performance analysis tools, recipes, handy scripts, microbenchmarks & more
Stars: ✭ 61 (+8.93%)
Mutual labels:  performance-analysis
performance-dashboard
Magento 2 Performance Dashboard
Stars: ✭ 60 (+7.14%)
Mutual labels:  performance-analysis
snippet-timekeeper
An android library to measure code execution time. No need to remove the measurement code, automatically becomes no-op in the release variants. Does not compromise with the code readability and comes with features that enhance the developer experience.
Stars: ✭ 70 (+25%)
Mutual labels:  performance-analysis
build-stats
🏆 get the build stats for pipelines 🏆
Stars: ✭ 79 (+41.07%)
Mutual labels:  performance-analysis
naeval
Comparing quality and performance of NLP systems for Russian language
Stars: ✭ 38 (-32.14%)
Mutual labels:  performance-analysis
PerfSpect
system performance characterization tool based on linux perf
Stars: ✭ 45 (-19.64%)
Mutual labels:  performance-analysis
SQLCallStackResolver
Utility to resolve SQL Server callstacks to their correct symbolic form using just PDBs and without a dump file
Stars: ✭ 55 (-1.79%)
Mutual labels:  performance-analysis
neurtu
Interactive parametric benchmarks in Python
Stars: ✭ 15 (-73.21%)
Mutual labels:  performance-analysis
benchmark-trend
Measure performance trends of Ruby code
Stars: ✭ 60 (+7.14%)
Mutual labels:  performance-analysis
ctsTraffic
ctsTraffic is a highly scalable client/server networking tool giving detailed performance and reliability analytics
Stars: ✭ 125 (+123.21%)
Mutual labels:  performance-analysis
financial-asset-comparison-tool
R Shiny app to compare the relative performance of cryptos and equities.
Stars: ✭ 97 (+73.21%)
Mutual labels:  performance-analysis

performance-timing

performance-timing.js利用HTML5中的navigation timing API进行前端性能数据采集,是性能监控平台搭建的利器

浏览器兼容性

请参考:http://caniuse.com/#feat=nav-timing

依赖

目前依赖jQuery,如果不希望依赖jQuery可以自己去实现函数$.param$.extend

优势

  • 浏览器原生支持,准确性高
  • 能够获取到更多的数据,例如DNS解析时间、重定向时间等
  • 支持页面首次渲染时间的采集
  • 代码量少(百行左右)
  • 可定制化程度高
  • 支持抽样
  • 支持在网页加载完成后进行数据采集和发送,减少页面的性能损耗

使用示例

    //支持 AMD 和 CMD,下面代码使用的是全局变量的方式
    Performance.start({
        url: "http://www.xxx.com/a.gif", //后端收集数据的URL,必填
        rate: 0.2, //抽样比例,默认是10%抽样
        data: { //额外需要记录的数据,非必填
            ext_domain: "www.xxx.com", //域名,默认是document.domain
            ext_path: "_wap_index" //页面,默认是encodeURIComponent(location.pathname.toLowerCase().replace(/\//g, "_"));
        }
    });

采集的数据说明

默认情况下脚本将会采集以下数据(详细计算公式可参看采集脚本):

参数 类型 描述
ext_domain string 域名
ext_path string 页面
t_unload number 上个文档的卸载时间
t_redirect number 页面重定向的时间
t_dns number DNS解析时间
t_tcp number 服务器连接时间
t_request number 服务器响应时间
t_response number 网页文档下载时间
t_paint number 首次渲染时间
t_dom number DOM Ready时间(阶段)
t_domready number DOM Ready时间(总和)
t_load number onload时间(阶段)
t_onload number onload时间(总和)
t_white number 白屏时间
t_all number 全部过程时间

注意事项

  • 后端利用数据进行统计时,需要排除值为0的项,避免某些不准确的数据或者未采集到的数据对性能指标产生影响
  • 用户IP以及浏览器识别的数据可以放到后端进行采集
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].