-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduced
init-single.html
manual test to test just one run of one…
… data set, without all tooling around it.
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,11 @@ | ||
<head> | ||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' https://ckeditor.com 'unsafe-inline' 'unsafe-eval'"> | ||
<!-- For a totally unknown reason, Travis and Vimeo do not like each other and the test fail on CI. --> | ||
<meta name="x-cke-crawler-ignore-patterns" content='{ | ||
"request-failure": "vimeo.com", | ||
"response-failure": "vimeo.com", | ||
"console-error": [ "<svg> attribute preserveAspectRatio", "vimeo.com" ] | ||
}'> | ||
</head> | ||
|
||
<div id="editor"></div> |
This file contains 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,27 @@ | ||
/** | ||
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/* globals console, window, document */ | ||
|
||
import config from './config'; | ||
import allDataSets from './data/generated/index.js'; | ||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor.js'; | ||
|
||
const initialData = allDataSets.paragraphs(); | ||
const finalConfig = { initialData, ...config }; | ||
const editorElement = document.querySelector( '#editor' ); | ||
|
||
const startTime = window.performance.now(); | ||
|
||
ClassicEditor | ||
.create( editorElement, finalConfig ) | ||
.then( () => { | ||
const testTime = window.performance.now() - startTime; | ||
|
||
console.log( testTime ); | ||
} ) | ||
.catch( err => { | ||
console.error( err.stack ); | ||
} ); |
This file contains 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,17 @@ | ||
# Performance: Editor init time | ||
|
||
**! Test with console off, in incognito mode !** | ||
|
||
This performance test measures how long editor initializes for various kinds of documents. Each data set presents a "heavy" document case, which takes substantial amount of time to load. | ||
|
||
The test starts automatically after you open this page. | ||
|
||
By default, the test goes through all data sets and performs 10 tries for each. Default run will take around 10 minutes. You can narrow it down using the test config in test source. | ||
|
||
The status message will inform you about current progress. | ||
|
||
After each single editor initialization, the initialization time is stored and the page is refreshed, until the whole suite is done. | ||
|
||
After all tests are done, the results will be inserted into the clipboard, in a format that can be directly pasted to a spreadsheet. Allow the browser to use the clipboard when prompted. Results are also displayed in the console. | ||
|
||
Between test runs, data is stored in `SessionStorage`. Close the tab to finish and "reset" the test run before it ended. |