Giter VIP home page Giter VIP logo

webperftoolbar's Introduction

Web Perf Toolbar

A component to visualize client performance on your site for the current page.

Shipped as a single JavaScript file with no runtime dependencies, this toolbar drops into your existing sites with a single script tag and barely any configuration. Designed to be injected into a page so developers or stakeholders can evaluate the performance of the page as they use it.

Getting Started

  1. You'll need Node and NPM.
  2. Visual Studio Code is the recommended editor. We have configured recommended extensions for working with this project.
  3. Install the npm dev dependencies. npm install
  4. Run the demo: npm run demo

Road Map

Note: This project follows semver and is pre-release. Until a 1.0 release, the public API may change. See "Releasing" below.

Alpha

  • General toolbar structure (Toolbar, PanelFrame, Panel, Button)
  • Expose Navigation timings
    • Shows key points in the page load.
  • Expose Resource timings
    • Shows how big files loaded are, including bytes over wire and time to first byte.
  • Expose User timings (expected version: 0.2.0-alpha)
    • List all marks (name, start time, duration of 0) sorted by start time ascending.
    • List all measures (name, start time, duration between two marks) sorted by start time ascending.
  • Continuous integration

Shipping all of these moves from -alpha to -beta.

Beta

  • Add a way for panels/buttons to update their contents periodically.
  • Expose Custom Metrics with Goals (expected version: 0.3.0-beta)
    • This is a specific renderer for measures that takes in a configuration object. The object defines names of custom goals, a warning goal value, a target goal value, and a getter that resolves the value to be compared against the goal. If the warning goal value is less than the target goal value, it is assumed the value should be less than the target. If the warning value is higher than the target value, it is assumed the value should be greater than the target. For example, if the warning is 80 and the target is 100, we assume smaller numbers are better. This allows people deploying the toolbar to configure a very custom panel without writing a full panel.
  • Automation that detects changes in the public API to prevent regressions.

Shipping all of these exits beta and bumps the major version to 1.0.0.

Beyond 1.0

We welcome contributions. See "Contributing" below. Think you have a great idea for a panel? Open an issue to discuss it. Built one already? Send a PR.

That said, here are some goals for this project:

  • We ship a single JavaScript file.
    • It must be painless for developers to integrate the toolbar. A mess of CSS, JS, or server side configuration gets messy. Keep it simple.
  • We are a client performance toolbar.
    • We don't collect or visualize server-side metrics that are exposed somehow though you could use the Custom Metrics pane to get at your server metrics, but that lives in the user's config and not in this repository.
  • We focus on the currently loaded page.
    • We don't try to persist and visualize info about previous loads.
  • We aren't a generic dev tools toolbar.
    • Don't build a cookie editor panel, do build a panel that shows the size of cookies and local storage.

Dev Commands (npm run ...)

Main Commands

  • demo Builds then launches a page with a demo of the toolbar.
  • build Kicks off a Webpack production build.
  • test Builds then launches a test runner in IE and Chrome that watches for changes.
  • check Compiles, lints, and tests everything. This command must be run and the output must be clean before checking in.

Source Commands

  • tslint Run tslint on the toolbar sources.
  • tsc Compile the toolbar TypeScript sources directly (no Webpack).
  • tsc-verbose Same as above, but verbose compiler.

Test commands

  • test-once Builds then launches a single test run.
  • test-tslint Runs tslint on the test sources.
  • test-tsc Compiles the test TypeScript sources directly (no Webpack/Karma).
  • test-tsc-verbose Same as above, but verbose compiler.

Maintainers

  • @AdamTReineke (Admin, primary contact)
  • @JoshuaKGoldberg (Admin)
  • Dadstart (Admin)

Releasing

This project follows the semver versioning convention of major.minor.patch.

  • Changing the public API will bump the major version.
  • Adding a whole new panel, changing/removing a panel configuration, or adding significant panel features will bump the minor version.
  • Bug fixes or minor tweak to a panel, including adding new optional panel configurations, will bump the patch version.
  1. Figure out what the new version number will be.
  2. If leaving 0.1.0-alpha, update the Security notice below and remove this line.
  3. From develop branch, create a new branch for the release: git checkout -b release-vxx.xx.xx
  4. npm run check should be clean.
  5. Verify the demo was updated to show any new panels.
  6. npm run demo should show the different panels in the toolbar.
  7. Bump the version in package.json.
  8. Update the road map in this file to address completed work.
  9. Make then merge a pull request from the new branch to master.
  10. Tag with the new version number. git tag vxx.xx.xx; git push --tags
  11. Push to NPM. TODO: What are the steps?

There is not a regular release schedule.

Reporting Security Issues

DURING ALPHA ONLY: Open a new issue so we can address the issue before leaving alpha. Once this project leaves alpha, the default Microsoft Security message below should be unstruck and followed.

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

webperftoolbar's People

Contributors

adamtreineke avatar dadstart avatar microsoftopensource avatar msftgits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

webperftoolbar's Issues

Add a link to documentation explaining timing buckets

It's hard for users to know what exactly is covered by the navigation timings. Let's add a link at the end of that panel to a new Markdown file in the docs folder that describes each bucket.

If you're grabbing this as a first issue, look at table in https://github.com/Microsoft/webperftoolbar/blob/develop/src/panels/navigation-timing.ts#L108 to find the defined times and how they're calculated (linked to an example line). Then create a navigation-timing.md file in the docs folder. Finally, add a link to that markdown file in the panel itself.

aXe violation: "Content should be contained in a landmark region"

Repro steps:

  1. Load this on a page
  2. Run aXe on the page (for example, with the Chrome extension)
To solve this violation, you need to:
Fix the following:
Content not contained by an ARIA landmark

Related nodes:
li:nth-child(1)
li[title="Total\ bytes\ over\ wire"]
li[title="Image\ bytes\ over\ wire"]

Add a 'Collect Info For Bugs' panel

This could stringify a whole bunch of perf data and have an extension point so that site owners can collect additional specific information (session IDs, etc).

Expose User timings

List all marks (name, start time, duration of 0) sorted by start time ascending.
List all measures (name, start time, duration between two marks) sorted by start time ascending.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.