config: Add 34 files
This commit is contained in:
75
debug-benchmark.js
Normal file
75
debug-benchmark.js
Normal file
@@ -0,0 +1,75 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
|
||||
async function debugBenchmark() {
|
||||
const browser = await puppeteer.launch({
|
||||
headless: 'new',
|
||||
args: ['--no-sandbox', '--disable-setuid-sandbox']
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36');
|
||||
|
||||
console.log('Loading CPU benchmark page...');
|
||||
await page.goto('https://www.cpubenchmark.net/cpu_list.php', {
|
||||
waitUntil: 'networkidle2',
|
||||
timeout: 60000
|
||||
});
|
||||
|
||||
console.log('\n=== ANALYZING TABLE STRUCTURE ===');
|
||||
|
||||
const tableInfo = await page.evaluate(() => {
|
||||
const tables = document.querySelectorAll('table');
|
||||
const rows = document.querySelectorAll('table tr');
|
||||
|
||||
// Get headers
|
||||
const headerRow = document.querySelector('table tr');
|
||||
const headers = Array.from(headerRow?.querySelectorAll('th, td') || [])
|
||||
.map(h => h.textContent.trim());
|
||||
|
||||
// Get first 5 data rows
|
||||
const samples = [];
|
||||
for (let i = 1; i < Math.min(6, rows.length); i++) {
|
||||
const cells = rows[i].querySelectorAll('td');
|
||||
samples.push(Array.from(cells).map(c => c.textContent.trim()));
|
||||
}
|
||||
|
||||
// Search for Intel Core i7-14700
|
||||
const searchResults = [];
|
||||
rows.forEach(row => {
|
||||
const cells = row.querySelectorAll('td');
|
||||
if (cells.length >= 2) {
|
||||
const name = cells[0]?.textContent?.trim();
|
||||
if (name && name.toLowerCase().includes('14700')) {
|
||||
const score = cells[1]?.textContent?.trim();
|
||||
searchResults.push({ name, score });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
tableCount: tables.length,
|
||||
rowCount: rows.length,
|
||||
headers: headers,
|
||||
samples: samples,
|
||||
search14700: searchResults
|
||||
};
|
||||
});
|
||||
|
||||
console.log(`\nTables found: ${tableInfo.tableCount}`);
|
||||
console.log(`Rows found: ${tableInfo.rowCount}`);
|
||||
console.log(`\nHeaders: ${JSON.stringify(tableInfo.headers)}`);
|
||||
|
||||
console.log('\nFirst 5 rows:');
|
||||
tableInfo.samples.forEach((row, i) => {
|
||||
console.log(`Row ${i + 1}: ${JSON.stringify(row)}`);
|
||||
});
|
||||
|
||||
console.log('\n=== SEARCH FOR 14700 CPUs ===');
|
||||
tableInfo.search14700.forEach(cpu => {
|
||||
console.log(`${cpu.name}: ${cpu.score}`);
|
||||
});
|
||||
|
||||
await browser.close();
|
||||
}
|
||||
|
||||
debugBenchmark().catch(console.error);
|
Reference in New Issue
Block a user