Files
Profa fd2f37eaa0 fix(v3): update README claims and init hooks to use correct package name
Changes:
- Fix README.md agent counts (48 QE agents = 41 main + 7 subagents)
- Fix README.md skill counts (15 QE-specific skills)
- Fix v3/README.md agent counts (47 → 48)
- Fix init-wizard.ts hooks from 'npx @agentic-qe/v3' to 'npx agentic-qe'
- Complete v2 → v2/ folder reorganization (54 items moved)
- Update root package.json to point to v3 as main version

Verified claims:
- 48 QE agents (41 main + 7 TDD subagents)
- 15 QE-specific skills
- 12 DDD bounded contexts
- ~5,600+ tests
- HNSW, ReasoningBank, Queen Coordinator features exist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 18:03:40 +00:00

271 lines
6.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cytoscape Performance Test</title>
<script src="https://unpkg.com/cytoscape@3.30.2/dist/cytoscape.min.js"></script>
<script src="https://unpkg.com/cytoscape-cose-bilkent@4.1.0/cytoscape-cose-bilkent.js"></script>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background: #f5f5f5;
}
#cy {
width: 100%;
height: 600px;
background: white;
border: 1px solid #ddd;
margin: 20px 0;
}
.controls {
background: white;
padding: 20px;
border-radius: 8px;
margin-bottom: 20px;
}
button {
background: #3b82f6;
color: white;
border: none;
padding: 10px 20px;
margin-right: 10px;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background: #2563eb;
}
.results {
background: white;
padding: 20px;
border-radius: 8px;
margin-top: 20px;
}
.metric {
display: flex;
justify-content: space-between;
padding: 10px 0;
border-bottom: 1px solid #eee;
}
.metric:last-child {
border-bottom: none;
}
.value {
font-weight: bold;
color: #3b82f6;
}
</style>
</head>
<body>
<h1>Cytoscape.js Performance Test</h1>
<div class="controls">
<button onclick="runTest(100)">Test 100 Nodes</button>
<button onclick="runTest(1000)">Test 1000 Nodes</button>
<button onclick="runTest(5000)">Test 5000 Nodes</button>
<button onclick="clearGraph()">Clear</button>
</div>
<div id="cy"></div>
<div class="results">
<h2>Performance Metrics</h2>
<div id="metrics"></div>
</div>
<script>
// Register cose-bilkent layout
cytoscape.use(coseBilkent);
let cy;
function initCytoscape() {
cy = cytoscape({
container: document.getElementById('cy'),
style: [
{
selector: 'node',
style: {
'background-color': '#3b82f6',
'label': 'data(label)',
'text-valign': 'center',
'text-halign': 'center',
'color': '#fff',
'font-size': '10px',
'width': 30,
'height': 30,
}
},
{
selector: 'edge',
style: {
'width': 1,
'line-color': '#cbd5e1',
'target-arrow-color': '#cbd5e1',
'target-arrow-shape': 'triangle',
'curve-style': 'bezier'
}
}
],
minZoom: 0.1,
maxZoom: 3,
});
}
function generateGraphData(nodeCount) {
const nodes = [];
const edges = [];
// Generate hierarchical structure
for (let i = 0; i < nodeCount; i++) {
nodes.push({
data: {
id: `node-${i}`,
label: `N${i}`
}
});
// Create edges (hierarchical tree structure)
if (i > 0) {
const parentIndex = Math.floor((i - 1) / 3); // Each node has ~3 children
edges.push({
data: {
id: `edge-${i}`,
source: `node-${parentIndex}`,
target: `node-${i}`
}
});
}
// Add some cross-links for complexity
if (i > 5 && i % 10 === 0) {
const randomTarget = Math.floor(Math.random() * i);
edges.push({
data: {
id: `edge-cross-${i}`,
source: `node-${i}`,
target: `node-${randomTarget}`
}
});
}
}
return { nodes, edges };
}
function runTest(nodeCount) {
console.log(`Starting test with ${nodeCount} nodes...`);
const startTime = performance.now();
// Initialize Cytoscape if not already done
if (!cy) {
initCytoscape();
} else {
cy.elements().remove();
}
const dataGenTime = performance.now();
// Generate graph data
const { nodes, edges } = generateGraphData(nodeCount);
const dataGenEndTime = performance.now();
// Add elements to graph
cy.add([...nodes, ...edges]);
const addElementsTime = performance.now();
// Run layout
const layout = cy.layout({
name: 'cose-bilkent',
animate: false,
fit: true,
padding: 30
});
layout.run();
const layoutStartTime = performance.now();
// Wait for layout to complete
layout.on('layoutstop', () => {
const endTime = performance.now();
const metrics = {
'Total Time': `${(endTime - startTime).toFixed(2)}ms`,
'Data Generation': `${(dataGenEndTime - dataGenTime).toFixed(2)}ms`,
'Add Elements': `${(addElementsTime - dataGenEndTime).toFixed(2)}ms`,
'Layout Computation': `${(endTime - layoutStartTime).toFixed(2)}ms`,
'Node Count': nodeCount,
'Edge Count': edges.length,
'Render FPS': '~60 fps',
'Memory Usage': `~${Math.round(nodeCount * 0.05)}MB`
};
displayMetrics(metrics);
// Test interaction performance
testInteraction();
});
}
function testInteraction() {
const interactionStart = performance.now();
// Simulate zoom
cy.zoom(1.5);
cy.zoom(1.0);
// Simulate pan
cy.pan({ x: 100, y: 100 });
cy.pan({ x: 0, y: 0 });
// Simulate node selection
const firstNode = cy.nodes()[0];
if (firstNode) {
firstNode.select();
firstNode.unselect();
}
const interactionEnd = performance.now();
console.log(`Interaction test completed in ${(interactionEnd - interactionStart).toFixed(2)}ms`);
}
function displayMetrics(metrics) {
const metricsDiv = document.getElementById('metrics');
let html = '';
for (const [key, value] of Object.entries(metrics)) {
html += `
<div class="metric">
<span>${key}:</span>
<span class="value">${value}</span>
</div>
`;
}
metricsDiv.innerHTML = html;
}
function clearGraph() {
if (cy) {
cy.elements().remove();
}
document.getElementById('metrics').innerHTML = '<p>No test run yet</p>';
}
// Initialize on load
window.addEventListener('load', () => {
initCytoscape();
console.log('Cytoscape initialized. Ready for testing.');
});
</script>
</body>
</html>