krisselden / ember-macro-benchmark

Benchmark recording of an ember app with running with 2 versions of Ember.
25 stars 9 forks source link

Quest Issue - Refactor #27

Open rwjblue opened 7 years ago

rwjblue commented 7 years ago

In order to allow both iteration in chrome-tracing and ember-macro-benchmarks we need to remove the requirement to git clone the repo (and work in that cloned copy).

After discussing with both @krisselden and @rondale-sc, I think it would be great if we could instead have this package follow the footsteps of ember-cli (during its migration from ember-app-kit to ember-cli). This would mean (at a high level):


I have created an example project that uses the new structure (completely non-functional obviously) which may help visualize things at rwjblue/macro-benchmark-example-project.

The basic structure being proposed is:

.
├── archives
│   └── archive.har
├── config
│   ├── v2.3.4
│   │   ├── archives
│   │   │   └── archive.har
│   │   ├── dist
│   │   └── index.js
│   └── v2.4.0
│       ├── dist
│       └── index.js
├── index.js
└── package.json

Where the top level index.js has the following:

interface ProjectConfig {
  har: string;
  runCount: number;
  networkConditions: 'GPRS' | ... | 'WIFI';
  cpuThrottleRate: number;
}

And the per-config level index.js's have the following:

interface PerConfigOptions {
  har: string;
  name: string;
  fingerprinted: boolean;
}

Below are the general steps that @rondale-sc and I came up with during a brainstorming session:

iezer commented 7 years ago

Pairing @rondale-sc, we're proposing to add folders for HAR files called archives both in the root folder and also in each of the individual config folders. So the structure will look like this:

.
├── archives
│   └── archive.har
├── config
│   ├── v2.3.4
│   │   ├── archives
│   │   │   └── archive.har
│   │   ├── dist
│   │   └── index.js
│   └── v2.4.0
│       ├── dist
│       └── index.js
├── index.js
└── package.json
rwjblue commented 7 years ago

@iezer - I think that works well, I'll update the outline above.