0.0.2 • Published 7 years ago

K-Report v0.0.2

Weekly downloads
97
License
MIT
Repository
github
Last release
7 years ago

K-Report

image

Build Status npm version Downloads License

Hope this is the best report you used library

  • loadtime: Report of the dom related time and ATF
  • network: Report the resource requests timeout
  • error: Record the request and error code

Instructions

Close it on the web, send a statistical package

Examples

    KReport.setOptions({
            'loadtime': {
                'url': 'http://k-report.404mzk.com/loadtime',
            },
            'network': {
                'url': 'http://k-report.404mzk.com/network',
                'timer': 5000,
                'timeout': 2,
            },
            'error': {
                'url': 'http://k-report.404mzk.com/error',
            }
       }
    )

DEMO

http://my.apache.com/K-Report/Example/loadtime/index.html

Try to send the report on the console to perform KReport.sendMessage() active packet

Installation

<script src="http://qiniu.404mzk.com/report-0.0.1index.bundle.js"></script>

And it's just as easy with npm:

npm i --save npm install K-Report 

API

keysub_keyoptionsdefaultinstructions
loadtimeurlstringhttp://k-inner-report.404mzk.com/v1/Creator_Loadtime_Controller/insertThe url of the data report
classLoadstring.k-report-classLoadActive statistical first screen class Settings
randomnumber0The number of random report 0 to send every time
networkurlstringhttp://k-inner-report.404mzk.com/v1/Creator_Network_Controller/insertThe url of the data report
timernumber5000Every how many seconds to check how many overtime resources(ms)
timeoutnumber1500Report of loading timeout(ms)
randomnumber0The number of random report 0 to send every time
errorurlstringhttp://k-inner-report.404mzk.com/v1/Creator_Error_Controller/insertThe url of the data report
randomnumber0The number of random report 0 to send every time

Report Data