-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): add profile time upfront estimation
- Loading branch information
Showing
13 changed files
with
397 additions
and
21 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
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
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,66 @@ | ||
import { innateBuilder, kayle } from "kayle"; | ||
import { drakeMock } from "./mocks/html-mock"; | ||
import { performance } from "perf_hooks"; | ||
import { test } from "@playwright/test"; | ||
import { _audit_not_ready } from "kayle_innate"; | ||
|
||
test("kayle_innate, fast_htmlcs, fast_axecore, and ace audit drakeMock profiling compare", async ({ | ||
page, | ||
browser, | ||
}, testInfo) => { | ||
if (process.env.LOG_ENABLED) { | ||
page.on("console", (msg) => console.log("PAGE LOG:", msg.text())); | ||
} | ||
const { html, css } = await innateBuilder({ | ||
page, | ||
browser, | ||
runners: ["htmlcs"], | ||
includeWarnings: true, | ||
origin: "https://www.drake.com", | ||
html: drakeMock, | ||
}); | ||
const startTime = performance.now(); | ||
// 8 - after building end engine optimized most likely will be at 12 ms | ||
await _audit_not_ready(html, css); | ||
const nextTime = performance.now() - startTime; | ||
console.log("Rust/WASM TIME ", nextTime); | ||
|
||
const st = performance.now(); | ||
await kayle({ | ||
page, | ||
browser, | ||
runners: ["htmlcs"], | ||
includeWarnings: true, | ||
origin: "https://www.drake.com", | ||
html: drakeMock, | ||
noIntercept: true, | ||
}); | ||
const nt = performance.now() - st; | ||
console.log("FAST_HTMLCS TIME", nt); | ||
|
||
const s = performance.now(); | ||
await kayle({ | ||
page, | ||
browser, | ||
runners: ["axe"], | ||
includeWarnings: true, | ||
origin: "https://www.drake.com", | ||
html: drakeMock, | ||
noIntercept: true, | ||
}); | ||
const n = performance.now() - s; | ||
console.log("FAST_AXE TIME", n); | ||
|
||
const a = performance.now(); | ||
await kayle({ | ||
page, | ||
browser, | ||
runners: ["ace"], | ||
includeWarnings: true, | ||
origin: "https://www.drake.com", | ||
html: drakeMock, | ||
noIntercept: true, | ||
}); | ||
const an = performance.now() - a; | ||
console.log("ACE TIME", an); | ||
}); |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,35 @@ | ||
/// clip bounding box | ||
pub struct Clip { | ||
/// the x coords | ||
x: u32, | ||
/// the y coords | ||
y: u32, | ||
/// the element height | ||
height: u32, | ||
/// the element width | ||
width: u32, | ||
} | ||
|
||
/// issue details | ||
pub struct Issue { | ||
/// the context of the issue or raw html | ||
pub context: String, | ||
/// the selector to identify the issue with css, xpath, or raw path | ||
pub selector: String, | ||
/// the type of code for the issue | ||
pub code: String, | ||
/// the type of issue | ||
pub issue_type: String, | ||
/// the typecode of the issue 0,1,2 | ||
pub type_code: u8, | ||
/// the message of the issue | ||
pub message: String, | ||
/// the type of runner | ||
pub runner: String, | ||
/// extra details for the runner | ||
pub runner_extras: std::collections::HashMap<String, String>, | ||
/// the amount of times the issue appeared | ||
pub recurrence: u32, | ||
/// the visual position of the element | ||
pub clip: Option<Clip>, | ||
} |
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,4 @@ | ||
/// issue handling and formats | ||
mod issue; | ||
/// rules like WCAG | ||
mod rules; |
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
// support for based locales in readme | ||
pub fn get_local(lang: &str, message: &str) -> String { | ||
/// get the local from the map | ||
Default::default() | ||
} |
Empty file.
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