Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b44d375
chore: apply SVP for flamegrill
Hotell Feb 20, 2023
b0a0074
feat(scripts-tasks): migrate and make perf setup generic
Hotell Feb 20, 2023
20021ed
feat(scripts-tasks): migrate and make perf setup generic v2
Hotell Feb 22, 2023
bdc32da
chore: remove flamegrill from app deps as it is used only within scri…
Hotell Feb 22, 2023
df6f27c
fix(scripts-tasks): format and update API usage which was modified by…
Hotell Feb 22, 2023
58bc225
generate changefile
Hotell Feb 22, 2023
573acc4
feat(scripts-perf-test-flamegrill): extract rendering and loading log…
Hotell Feb 22, 2023
0b6a05a
ci: unify emmited variables within pipeline
Hotell Feb 23, 2023
2596559
fix(scripts-tasks): use existing flamegrill version
Hotell Feb 23, 2023
d27bf11
fix(perf-test-react-components): properly declare scneariosProjectName
Hotell Feb 23, 2023
b046501
refactor(perf-test-northstar): make config more DRY by using common e…
Hotell Feb 24, 2023
1e4b7d8
feat(scripts-tasks): add excludeScenarios api needed after rebase cha…
Hotell Mar 30, 2023
2715342
refactor: update postprocessTask api after rebase
Hotell Mar 30, 2023
e4758e5
feat(scripts-tasks): add config validation for perf-test and update p…
Hotell Mar 30, 2023
57c3d2a
fixup! feat(scripts-tasks): add config validation for perf-test and u…
Hotell Mar 30, 2023
8cea40d
fixup! fixup! feat(scripts-tasks): add config validation for perf-tes…
Hotell Mar 30, 2023
1a98df7
fix(perf-test-northstar): make ts pass as we enabled checking for jus…
Hotell Mar 30, 2023
56ce87f
fix(perf-test-northstar): pass config directly as API was changed
Hotell Mar 30, 2023
512f962
ci: simplify perf-test-northstar calls by reducing npm script alias
Hotell Mar 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ scripts/ts-node @microsoft/fluentui-react-build
scripts/update-release-notes @microsoft/fluentui-react-build
scripts/utils @microsoft/fluentui-react-build
scripts/webpack @microsoft/fluentui-react-build
scripts/perf-test-flamegrill @microsoft/fluentui-react-build

#### Fluent UI N*
packages/a11y-rules @microsoft/fluentui-northstar
Expand Down
21 changes: 21 additions & 0 deletions apps/perf-test-react-components/config/perf-test/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as path from 'path';
import { scenarioIterations } from './scenarioIterations';
import { scenarioRenderTypes } from './scenarioRenderTypes';
import { scenarioNames } from './scenarioNames';

const projectRoot = path.join(__dirname, '../../');
const projectRootPath = 'apps/perf-test-react-components';
const outDir = path.join(projectRoot, './dist');
const tempDir = path.join(projectRoot, './logfiles');
const scenariosSrcDirPath = path.join(projectRoot, './src/scenarios');

export const config = {
projectName: '@fluentui/react-components',
projectRootPath,
outDir,
tempDir,
scenariosSrcDirPath,
scenarioIterations,
scenarioRenderTypes,
scenarioNames,
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ScenarioIterations } from '@fluentui/scripts-tasks';
// You don't have to add scenarios to this structure unless you want their iterations to differ from the default.
export const scenarioIterations = {
export const scenarioIterations: ScenarioIterations = {
MakeStyles: 50000,
FluentProviderWithTheme: 10,
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { ScenarioNames } from '@fluentui/scripts-tasks';
// You don't have to add scenarios to this structure unless you want their display name to differ
// from their scenario name.
export const scenarioNames = {};
export const scenarioNames: ScenarioNames = {};
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AllRenderTypes, ScenarioRenderTypes } from '@fluentui/scripts-tasks';
/**
* You don't have to add scenarios to this structure unless
* you want their render types to differ from the default (mount only).
Expand All @@ -8,9 +9,6 @@
* memoization logic help avoid certain code paths.
*/

const AllRenderTypes = ['mount', 'virtual-rerender', 'virtual-rerender-with-unmount'];
export const DefaultRenderTypes = ['mount'];

export const scenarioRenderTypes = {
export const scenarioRenderTypes: ScenarioRenderTypes = {
FluentProviderWithTheme: AllRenderTypes,
};
7 changes: 4 additions & 3 deletions apps/perf-test-react-components/just.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { getPerfRegressions } from './tasks/perf-test';
import { preset, task, series } from '@fluentui/scripts-tasks';
import { preset, task, series, getPerfRegressions } from '@fluentui/scripts-tasks';

import { config } from './config/perf-test';

preset();

task('run-perf-test', getPerfRegressions);
task('run-perf-test', () => getPerfRegressions(config));
task('perf-test', series('build', 'bundle', 'run-perf-test'));
4 changes: 1 addition & 3 deletions apps/perf-test-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@fluentui/scripts-webpack": "*"
},
"dependencies": {
"@fluentui/scripts-perf-test-flamegrill": "*",
"@griffel/core": "^1.9.0",
"@fluentui/react-avatar": "^9.4.6",
"@fluentui/react-button": "^9.3.6",
Expand All @@ -27,9 +28,6 @@
"@fluentui/react-spinbutton": "^9.2.6",
"@fluentui/react-theme": "^9.1.7",
"@microsoft/load-themed-styles": "^1.10.26",
"flamegrill": "0.2.0",
"lodash": "^4.17.15",
"querystring": "^0.2.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"tslib": "^2.1.0"
Expand Down
10 changes: 10 additions & 0 deletions apps/perf-test-react-components/src/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { loadScenarios, render } from '@fluentui/scripts-perf-test-flamegrill';

bootstrap();

function bootstrap() {
const reqContext = require.context('./scenarios/', false, /^\.\/[^\.]*\.(j|t)sx?$/);
const scenarios = loadScenarios(reqContext);

render(scenarios);
}
57 changes: 0 additions & 57 deletions apps/perf-test-react-components/src/index.scenarios.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions apps/perf-test-react-components/src/scenarios/scenarioList.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/perf-test-react-components/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { resources } = require('@fluentui/scripts-webpack');
// TODO: Should root cause why this only works as a serve config.
module.exports = resources.createServeConfig(
{
entry: './src/index.scenarios.tsx',
entry: './src/app.tsx',
mode: 'production',
output: {
filename: 'perf-test.js',
Expand Down
24 changes: 24 additions & 0 deletions apps/perf-test/config/perf-test/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as path from 'path';
import { scenarioIterations } from './scenarioIterations';
import { scenarioRenderTypes } from './scenarioRenderTypes';
import { scenarioNames } from './scenarioNames';

const projectRoot = path.join(__dirname, '../../');
const projectRootPath = 'apps/perf-test';
const outDir = path.join(projectRoot, './dist');
const tempDir = path.join(projectRoot, './logfiles');
const scenariosSrcDirPath = path.join(projectRoot, './src/scenarios');

export const config = {
projectName: '@fluentui/react',
projectRootPath,
outDir,
tempDir,
scenarioIterations,
scenarioRenderTypes,
scenariosSrcDirPath,
excludeScenarios: [
// TeachingBubble perf test is hanging after puppeteer pin to v19. Disabling for now to unblock SWC migration work.
'TeachingBubble',
],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { ScenarioIterations } from '@fluentui/scripts-tasks';

// You don't have to add scenarios to this structure unless you want their iterations to differ from the default.
export const scenarioIterations = {
export const scenarioIterations: ScenarioIterations = {
DocumentCardTitle: 1000,
Breadcrumb: 1000,
CommandBar: 1000,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { ScenarioNames } from '@fluentui/scripts-tasks';

// You don't have to add scenarios to this structure unless you want their display name to differ
// from their scenario name.
export const scenarioNames = {
export const scenarioNames: ScenarioNames = {
DetailsRowFast: 'DetailsRow (fast icons)',
DetailsRowNoStyles: 'DetailsRow without styles',
DocumentCardTitle: 'DocumentCardTitle with truncation',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ScenarioRenderTypes, AllRenderTypes } from '@fluentui/scripts-tasks';

/**
* You don't have to add scenarios to this structure unless
* you want their render types to differ from the default (mount only).
Expand All @@ -8,10 +10,7 @@
* memoization logic help avoid certain code paths.
*/

const AllRenderTypes = ['mount', 'virtual-rerender', 'virtual-rerender-with-unmount'];
export const DefaultRenderTypes = ['mount'];

export const scenarioRenderTypes = {
export const scenarioRenderTypes: ScenarioRenderTypes = {
ThemeProvider: AllRenderTypes,
GroupedList: AllRenderTypes,
GroupedListV2: AllRenderTypes,
Expand Down
7 changes: 4 additions & 3 deletions apps/perf-test/just.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { getPerfRegressions } from './tasks/perf-test';
import { preset, task, series } from '@fluentui/scripts-tasks';
import { preset, task, series, getPerfRegressions } from '@fluentui/scripts-tasks';

import { config } from './config/perf-test';

preset();

task('run-perf-test', getPerfRegressions);
task('run-perf-test', () => getPerfRegressions(config));
task('perf-test', series('build', 'bundle', 'run-perf-test'));
4 changes: 1 addition & 3 deletions apps/perf-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
"@fluentui/scripts-webpack": "*"
},
"dependencies": {
"@fluentui/scripts-perf-test-flamegrill": "*",
"@fluentui/example-data": "^8.4.7",
"@fluentui/react": "^8.106.10",
"@microsoft/load-themed-styles": "^1.10.26",
"flamegrill": "0.2.0",
"lodash": "^4.17.15",
"querystring": "^0.2.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"tslib": "^2.1.0"
Expand Down
14 changes: 14 additions & 0 deletions apps/perf-test/src/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { loadScenarios, render } from '@fluentui/scripts-perf-test-flamegrill';

import { initializeIcons } from '@fluentui/react/lib/Icons';

bootstrap();

function bootstrap() {
const reqContext = require.context('./scenarios/', false, /^\.\/[^\.]*\.(j|t)sx?$/);
const scenarios = loadScenarios(reqContext);

initializeIcons();

render(scenarios);
}
60 changes: 0 additions & 60 deletions apps/perf-test/src/index.scenarios.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions apps/perf-test/src/scenarios/scenarioList.ts

This file was deleted.

Loading