3 Star 4 Fork 0

Gitee 极速下载/OpenSearch-Dashboards

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/opensearch-project/OpenSearch-Dashboards
克隆/下载
.lighthouserc.js 2.92 KB
一键复制 编辑 原始数据 按行查看 历史
Ruchi Sharma 提交于 2025-03-21 04:28 +08:00 . Lighthouse performance metrics setup (#9304)
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
const fs = require('fs');
const baseline = JSON.parse(fs.readFileSync('baselines/lighthouse_baseline.json', 'utf8'));
const baseUrl = 'http://localhost:5601';
module.exports = {
ci: {
collect: {
url: [
`${baseUrl}/app/home`,
`${baseUrl}/app/dashboards#/view/722b74f0-b882-11e8-a6d9-e546fe2bba5f`,
`${baseUrl}/app/data-explorer/discover`,
`${baseUrl}/app/visualize`,
], // Add more URLs as needed
startServerCommand: 'yarn start --no-base-path',
numberOfRuns: 1,
settings: {
chromePath: require('puppeteer').executablePath(),
chromeFlags: '--no-sandbox --disable-gpu --headless',
formFactor: 'desktop', // This will enforce the desktop view
viewport: {
width: 1280, // Optional: Set a specific width
height: 800, // Optional: Set a specific height
},
screenEmulation: {
// Disable mobile emulation
disabled: true,
},
},
},
assert: {
assertMatrix: [
{
matchingUrlPattern: '/app/home',
assertions: {
'first-contentful-paint': [
'warn',
{
maxNumericValue: baseline['/app/home']['first-contentful-paint'],
},
],
'speed-index': ['warn', { maxNumericValue: baseline['/app/home']['speed-index'] }],
},
},
{
matchingUrlPattern: '/app/data-explorer/discover',
assertions: {
'first-contentful-paint': [
'warn',
{
maxNumericValue: baseline['/app/data-explorer/discover']['first-contentful-paint'],
},
],
'speed-index': [
'warn',
{ maxNumericValue: baseline['/app/data-explorer/discover']['speed-index'] },
],
},
},
{
matchingUrlPattern: '/app/visualize',
assertions: {
'first-contentful-paint': [
'warn',
{
maxNumericValue: baseline['/app/visualize']['first-contentful-paint'],
},
],
'speed-index': ['warn', { maxNumericValue: baseline['/app/visualize']['speed-index'] }],
},
},
{
matchingUrlPattern: '/app/dashboards',
assertions: {
'first-contentful-paint': [
'warn',
{
maxNumericValue: baseline['/app/dashboards']['first-contentful-paint'],
},
],
'speed-index': [
'warn',
{ maxNumericValue: baseline['/app/dashboards']['speed-index'] },
],
},
},
],
},
},
upload: {
target: 'temporary-public-storage', // Required for GitHub integration
githubStatusCheck: false,
},
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/mirrors/OpenSearch-Dashboards.git
git@gitee.com:mirrors/OpenSearch-Dashboards.git
mirrors
OpenSearch-Dashboards
OpenSearch-Dashboards
main

搜索帮助