This repository was archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
perf: add base perf examples #2164
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
10a373c
chore: sort yarn perf table
levithomason e0bafbe
perf: add base perf examples
levithomason 2dc35f3
refactor: base perf to minimal perf
levithomason e389f73
fix: typo
levithomason 312f969
revert CSF, it breaks maximized view, screener, and codesandbox
levithomason 3b3db63
fix tooltip minimal example
levithomason File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Accordion/Performance/AccordionMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Accordion } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const AccordionMinimalPerf = () => <Accordion /> | ||
|
||
AccordionMinimalPerf.iterations = 5000 | ||
AccordionMinimalPerf.filename = 'AccordionMinimal.perf.tsx' | ||
|
||
export default AccordionMinimalPerf |
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Alert/Performance/AlertMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Alert } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const AlertMinimalPerf = () => <Alert /> | ||
|
||
AlertMinimalPerf.iterations = 5000 | ||
AlertMinimalPerf.filename = 'AlertMinimal.perf.tsx' | ||
|
||
export default AlertMinimalPerf |
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Animation/Performance/AnimationMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Animation } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const AnimationMinimalPerf = () => <Animation /> | ||
|
||
AnimationMinimalPerf.iterations = 5000 | ||
AnimationMinimalPerf.filename = 'AnimationMinimal.perf.tsx' | ||
|
||
export default AnimationMinimalPerf |
8 changes: 0 additions & 8 deletions
8
docs/src/examples/components/Attachment/Performance/Attachment.perf.tsx
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Attachment/Performance/AttachmentMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Attachment } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const AttachmentMinimalPerf = () => <Attachment /> | ||
|
||
AttachmentMinimalPerf.iterations = 5000 | ||
AttachmentMinimalPerf.filename = 'AttachmentMinimal.perf.tsx' | ||
|
||
export default AttachmentMinimalPerf |
18 changes: 18 additions & 0 deletions
18
docs/src/examples/components/Attachment/Performance/AttachmentSlots.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Attachment } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const AttachmentSlotsPerf = () => ( | ||
<Attachment | ||
actionable | ||
icon="table" | ||
header="Document.docx" | ||
description="800 Kb" | ||
action={{ icon: 'more', title: 'More Action' }} | ||
progress={33} | ||
/> | ||
) | ||
|
||
AttachmentSlotsPerf.iterations = 5000 | ||
AttachmentSlotsPerf.filename = 'AttachmentSlots.perf.tsx' | ||
|
||
export default AttachmentSlotsPerf |
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Avatar/Performance/AvatarMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Avatar } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const AvatarMinimalPerf = () => <Avatar /> | ||
|
||
AvatarMinimalPerf.iterations = 5000 | ||
AvatarMinimalPerf.filename = 'AvatarMinimal.perf.tsx' | ||
|
||
export default AvatarMinimalPerf |
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Box/Performance/BoxMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Box } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const BoxMinimalPerf = () => <Box /> | ||
|
||
BoxMinimalPerf.iterations = 5000 | ||
BoxMinimalPerf.filename = 'BoxMinimal.perf.tsx' | ||
|
||
export default BoxMinimalPerf |
8 changes: 0 additions & 8 deletions
8
docs/src/examples/components/Button/Performance/Button.perf.tsx
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Button/Performance/ButtonMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Button } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const ButtonMinimalPerf = () => <Button /> | ||
|
||
ButtonMinimalPerf.iterations = 5000 | ||
ButtonMinimalPerf.filename = 'ButtonMinimal.perf.tsx' | ||
|
||
export default ButtonMinimalPerf |
21 changes: 21 additions & 0 deletions
21
docs/src/examples/components/Button/Performance/ButtonSlots.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Button } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const ButtonSlotsPerf = () => ( | ||
<Button | ||
icon="play" | ||
content="Click here" | ||
loader={{ | ||
delay: 200, | ||
inline: true, | ||
label: 'Loading', | ||
labelPosition: 'end', | ||
size: 'smallest', | ||
}} | ||
/> | ||
) | ||
|
||
ButtonSlotsPerf.iterations = 5000 | ||
ButtonSlotsPerf.filename = 'ButtonSlots.perf.tsx' | ||
|
||
export default ButtonSlotsPerf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Carousel/Performance/CarouselMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Carousel } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const CarouselMinimalPerf = () => <Carousel /> | ||
|
||
CarouselMinimalPerf.iterations = 5000 | ||
CarouselMinimalPerf.filename = 'CarouselMinimal.perf.tsx' | ||
|
||
export default CarouselMinimalPerf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Chat/Performance/ChatMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Chat } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const ChatMinimalPerf = () => <Chat /> | ||
|
||
ChatMinimalPerf.iterations = 5000 | ||
ChatMinimalPerf.filename = 'ChatMinimal.perf.tsx' | ||
|
||
export default ChatMinimalPerf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Checkbox/Performance/CheckboxMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Checkbox } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const CheckboxMinimalPerf = () => <Checkbox /> | ||
|
||
CheckboxMinimalPerf.iterations = 5000 | ||
CheckboxMinimalPerf.filename = 'CheckboxMinimal.perf.tsx' | ||
|
||
export default CheckboxMinimalPerf |
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Dialog/Performance/DialogMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Dialog } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const DialogMinimalPerf = () => <Dialog /> | ||
|
||
DialogMinimalPerf.iterations = 5000 | ||
DialogMinimalPerf.filename = 'DialogMinimal.perf.tsx' | ||
|
||
export default DialogMinimalPerf |
8 changes: 0 additions & 8 deletions
8
docs/src/examples/components/Divider/Performance/Divider.perf.tsx
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Divider/Performance/DividerMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Divider } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const DividerMinimalPerf = () => <Divider /> | ||
|
||
DividerMinimalPerf.iterations = 5000 | ||
DividerMinimalPerf.filename = 'DividerMinimal.perf.tsx' | ||
|
||
export default DividerMinimalPerf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Dropdown/Performance/DropdownMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Dropdown } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const DropdownMinimalPerf = () => <Dropdown /> | ||
|
||
DropdownMinimalPerf.iterations = 5000 | ||
DropdownMinimalPerf.filename = 'DropdownMinimal.perf.tsx' | ||
|
||
export default DropdownMinimalPerf |
9 changes: 9 additions & 0 deletions
9
docs/src/examples/components/Embed/Performance/EmbedMinimal.perf.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Embed } from '@fluentui/react' | ||
import * as React from 'react' | ||
|
||
const EmbedMinimalPerf = () => <Embed /> | ||
|
||
EmbedMinimalPerf.iterations = 5000 | ||
EmbedMinimalPerf.filename = 'EmbedMinimal.perf.tsx' | ||
|
||
export default EmbedMinimalPerf |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've sorted the
yarn perf
results by their median values with the slowest components up top.