-
-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* A new compare plugin. Make it possible to compare the performance using Wilcox or Mann Whitney U.
- Loading branch information
1 parent
1f0cf12
commit da6c099
Showing
13 changed files
with
903 additions
and
5 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
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 @@ | ||
import fs from 'node:fs/promises'; | ||
import { join, resolve } from 'node:path'; | ||
|
||
export async function getBaseline(id, compareOptions) { | ||
try { | ||
return JSON.parse( | ||
await fs.readFile( | ||
resolve( | ||
join(compareOptions.baselinePath || process.cwd(), `${id}.json`) | ||
) | ||
) | ||
); | ||
} catch { | ||
return; | ||
} | ||
} | ||
/* | ||
async function getBaselineFromInternet(url) { | ||
try { | ||
const response = await fetch(url); | ||
return response.json(); | ||
} catch (error) { | ||
log.error('Could not fetch', error); | ||
} | ||
} | ||
async function getBaselineFromFile(path) {} | ||
/* | ||
export async function saveBaseline(json, options) { | ||
}*/ | ||
export async function saveBaseline(json, name) { | ||
return fs.writeFile(resolve(name), JSON.stringify(json)); | ||
} |
Oops, something went wrong.