tracerbench-cli
CLI for Tracerbench
Last updated 8 days ago by lynchbomb .
BSD-2-Clause · Bugs · Original npm · Tarball · package.json
$ cnpm install tracerbench-cli 
SYNC missed versions from official npm registry.

!!! This is unstable, incomplete, work-in-progress software in a constant state of change. You have been warned!!!

TracerBench-CLI: Automated Chrome Tracing For Benchmarking

Build Status Version License

Usage

$ npm install -g tracerbench-cli
$ tracerbench COMMAND
running command...
$ tracerbench (-v|--version|version)
tracerbench-cli/2.0.0-beta.5 darwin-x64 node-v10.15.2
$ tracerbench --help [COMMAND]
USAGE
  $ tracerbench COMMAND
...

Optional Config

The optional existance of a "tbconfig.json" file in the project root will be consumed by TracerBench and specifies default command flag options. Please note this file is optional, however is strongly recommended as this drastically speeds up running TracerBench tests succinctly. Typings and Example:

{
  "file": "./trace.json",
  "fidelity": "low",
  "methods": "''",
  "cpuThrottleRate": 2,
  "output": "tracerbench-results",
  "urlOrFrame": "https://www.tracerbench.com",
  "url": "https://www.tracerbench.com",
  "harsPath": "./hars",
  "routes": ["/about", "/contact"],
  "appName": "tracerbench",
  "markers": [
    {
      "start": "fetchStart",
      "label": "fetchStart"
    },
    {
      "start": "jqueryLoaded",
      "label": "jqueryLoaded"
    },
    {
      "start": "renderEnd",
      "label": "renderEnd"
    }
  ]
}

FAQ

What exactly is contained within the tracerbench compare "tracerbench-results.json"?
An overview of "tracerbench-results.json" is available here

What exactly is a HAR file?
HAR (HTTP Archive) is a file format used by several HTTP session tools to export the captured data. The format is basically a JSON object with a particular field distribution. In any case, please note that not all the fields are mandatory, and many times some information won't be saved to the file "Additional insight on Google's HAR Analyzer"

What exactly is contained within the output file "trace.json"?
The file "trace.json" is leveraged by TracerBench to capture an array of trace events. The interface of an individual trace event is essentially:

// process id
pid: number;
// thread id
tid: number;
// timestamp in μs
ts: number;
// event phase
ph: TRACE_EVENT_PHASE;
// event categories (comma delimited)
cat: string;
// event name
name: string;
// event key/value pairs
args: { [key: string]: any } | ARGS.STRIPPED;
// ?timestamp in μs for trace event phase complete
dur?: number;
// ?thread clock timestamp in μs
tts?: number;
// ?thread clock duration in μs for trace event phase complete
tdur?: number;
// ?thread clock timestamp for related async events
use_async_tts?: number;
// ?scope of id
scope?: string;
// ?event id. optionally serialized as int64
id?: string;
// ?scoped event ids
id2?: | { local: string; } | { global: string; };
// ?async event/event associations
bp?: string;
// ?flow binding id optionally serialized as int64
bind_id?: string;
// ?incoming flow flag
flow_in?: boolean;
// ?outgoing flow flag
flow_out?: boolean;
// ?scope for TRACE_EVENT_PHASE_INSTANT events
s?: TRACE_EVENT_SCOPE;

Commands

tracerbench analyze

Parses a CPU profile and aggregates time across heuristics. Can be vertically sliced with event names.

USAGE
  $ tracerbench analyze

OPTIONS
  -a, --archive=archive                  (required) [default: ./trace.har] Path to the existing HAR file
  -f, --traceJSONOutput=traceJSONOutput  (required) [default: ./trace.json] Output path for the trace JSON file
  -m, --methods=methods                  (required) [default: ""] List of methods to aggregate

  -r, --report=report                    Directory path to generate a report with aggregated sums for each heuristic
                                         category and aggregated sum across all heuristics

  --event=event                          Slice time and see the events before and after the time slice

tracerbench compare

Compare the performance delta between an experiment and control

USAGE
  $ tracerbench compare

OPTIONS
  -n, --network=none | offline | dialup | 2g | edge | slow-3g | em-3g | dsl | 3g | fast-3g | 4g | cable | LTE | FIOS
      (required) [default: none] Simulated network conditions.

  -o, --output=output
      (required) [default: ./tracerbench-results] The output filepath for compare results

  --browserArgs=browserArgs
      (required) [default: 
      --headless,--disable-gpu,--hide-scrollbars,--mute-audio,--v8-cache-options=none,--disable-cache,--disable-v8-idle-ta
      sks,--crash-dumps-dir=./tmp] (Default Recommended) Browser additional options for the TracerBench render benchmark

  --controlURL=controlURL
      (required) [default: http://localhost:8000/] Control URL to visit

  --cpuThrottleRate=cpuThrottleRate
      (required) [default: 4] CPU throttle multiplier

  --experimentURL=experimentURL
      (required) [default: http://localhost:8001/] Experiment URL to visit

  --fidelity=test|low|medium|high
      (required) [default: low] Directly correlates to the number of samples per trace. "T-shirt sizing" High means a 
      longer trace time.

  --markers=markers
      (required) [default: domComplete] User Timing Markers

  --tracingLocationSearch=tracingLocationSearch
      (required) [default: ?tracing] The document location search param.

tracerbench create-archive

Creates an automated HAR file from a URL.

USAGE
  $ tracerbench create-archive

OPTIONS
  --archiveOutput=archiveOutput  (required) [default: ./trace.har] The output filepath/name to save the HAR to
  --url=url                      (required) [default: http://localhost:8000/] URL to visit

tracerbench css-parse

Aggregates CSS parsing time from a trace.

USAGE
  $ tracerbench css-parse

OPTIONS
  -f, --traceJSONOutput=traceJSONOutput  (required) [default: ./trace.json] Output path for the trace JSON file

tracerbench help [COMMAND]

display help for tracerbench

USAGE
  $ tracerbench help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

tracerbench js-eval-time

Aggregates JS Eval time from a trace.

USAGE
  $ tracerbench js-eval-time

OPTIONS
  -f, --traceJSONOutput=traceJSONOutput  (required) [default: ./trace.json] Output path for the trace JSON file

tracerbench list-functions

Lists all the functions and source locations from a trace.

USAGE
  $ tracerbench list-functions

OPTIONS
  -f, --traceJSONOutput=traceJSONOutput  (required) [default: ./trace.json] Output path for the trace JSON file
  -l, --locations=locations              include locations in names

tracerbench timeline:find

Get frame id from trace JSON file and url.

USAGE
  $ tracerbench timeline:find

OPTIONS
  -f, --traceJSONOutput=traceJSONOutput  (required) [default: ./trace.json] Output path for the trace JSON file
  --url=url                              (required) [default: http://localhost:8000/] URL to visit

tracerbench timeline:list

list main frame loads

USAGE
  $ tracerbench timeline:list

OPTIONS
  -f, --traceJSONOutput=traceJSONOutput  (required) [default: ./trace.json] Output path for the trace JSON file

tracerbench timeline:show

show tracefile with user timings

USAGE
  $ tracerbench timeline:show

OPTIONS
  -f, --traceJSONOutput=traceJSONOutput  (required) [default: ./trace.json] Output path for the trace JSON file
  --filter=filter                        User timing marks start with
  --marks=marks                          Show user timing marks
  --urlOrFrame=urlOrFrame                (required) URL or Frame

tracerbench trace

Creates an automated trace JSON file. Also takes network conditioner and CPU throttling options.

USAGE
  $ tracerbench trace

OPTIONS
  -f, --traceJSONOutput=traceJSONOutput
      (required) [default: ./trace.json] Output path for the trace JSON file

  -h, --har=har
      Filepath to the existing HAR file

  -n, --network=none | offline | dialup | 2g | edge | slow-3g | em-3g | dsl | 3g | fast-3g | 4g | cable | LTE | FIOS
      [default: none] Simulated network conditions.

  --archiveOutput=archiveOutput
      (required) [default: ./trace.har] The output filepath/name to save the HAR to

  --cpuThrottleRate=cpuThrottleRate
      (required) [default: 4] CPU throttle multiplier

  --iterations=iterations
      (required) [default: 1] Number of runs

  --url=url
      (required) [default: http://localhost:8000/] URL to visit

Current Tags

  • 2.0.0-beta.5                                ...           latest (8 days ago)

16 Versions

  • 2.0.0-beta.5                                ...           8 days ago
  • 2.0.0-beta.4                                ...           10 days ago
  • 2.0.0-beta.3                                ...           25 days ago
  • 1.0.0                                ...           25 days ago
  • 1.0.0-alpha.11                                ...           25 days ago
  • 1.0.0-alpha.10                                ...           a month ago
  • 1.0.0-alpha.9                                ...           a month ago
  • 1.0.0-alpha.8                                ...           a month ago
  • 1.0.0-alpha.7                                ...           2 months ago
  • 1.0.0-alpha.6                                ...           2 months ago
  • 1.0.0-alpha.5                                ...           2 months ago
  • 1.0.0-alpha.4                                ...           2 months ago
  • 1.0.0-alpha.3                                ...           2 months ago
  • 1.0.0-alpha.2                                ...           2 months ago
  • 1.0.0-alpha.1                                ...           2 months ago
  • 1.0.0-alpha.0                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 117
Last Day 0
Last Week 60
Last Month 275
Dependencies (15)
Dev Dependencies (25)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |