-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspeed-test.js
More file actions
36 lines (30 loc) · 1.01 KB
/
speed-test.js
File metadata and controls
36 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const fs = require('fs');
const gemini = require('./src/gemini-vision');
const lmstudio = require('./src/lmstudio-vision');
console.log('=== SPEED COMPARISON TEST ===');
async function speedTest() {
const testImage = '/Users/username/Desktop/sample-screenshot.png';
if (!fs.existsSync(testImage)) {
console.log('Test image not found');
return;
}
console.log('Testing Gemini speed...');
const geminiStart = Date.now();
try {
const geminiResult = await gemini.analyzeImage(testImage);
const geminiTime = Date.now() - geminiStart;
console.log(`Gemini: ${geminiTime}ms - ${geminiResult}`);
} catch (err) {
console.log(`Gemini failed: ${err.message}`);
}
console.log('\nTesting LM Studio speed...');
const lmStart = Date.now();
try {
const lmResult = await lmstudio.analyzeImage(testImage);
const lmTime = Date.now() - lmStart;
console.log(`LM Studio: ${lmTime}ms - ${lmResult}`);
} catch (err) {
console.log(`LM Studio failed: ${err.message}`);
}
}
speedTest();