Skip to content
This repository has been archived by the owner on Jul 31, 2022. It is now read-only.

Commit

Permalink
Performance test suite #22
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Jun 23, 2021
1 parent eecc80a commit dcbfd2f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ async function testModels(testStats) {
stats.loadingTime = pageStats.loadingTime;
stats.fps = pageStats.fps;
stats.screenshot = "screenshot.png";

console.log("All XKT models tested in xeokit.\n");
}

console.log("All XKT models tested in xeokit.\n");
}

async function convert(modelSrc, metaModelSrc, xktDest, objectPropsDest, stats) {
Expand All @@ -293,9 +293,9 @@ async function convert(modelSrc, metaModelSrc, xktDest, objectPropsDest, stats)
outputXKT: async function (xktData) {
await fs.promises.writeFile(xktDest, xktData);
},
// outputObjectProperties: async function (id, props) {
// await fs.promises.writeFile(`${objectPropsDir}/${id}.json`, JSON.stringify(props, null, "\t"));
// },
outputObjectProperties: async function (id, props) {
await fs.promises.writeFile(`${objectPropsDir}/${id}.json`, JSON.stringify(props, null, "\t"));
},
stats,
log: (msg) => {
console.log(msg)
Expand All @@ -320,11 +320,11 @@ function statsToMarkdown(testStats) {
rows.push("\n");
rows.push("## Results");
rows.push("\n");
rows.push('| Screenshot | Source | Objects | Triangles | Vertices | Source kB | XKT kB | Compression | Convert Secs | Load Secs | FPS |');
rows.push('| Screenshot | Source | Convert Secs | Load Secs | FPS | Objects | Triangles | Vertices | Source kB | XKT kB | Compression |');
rows.push('| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |');
for (let modelId in modelStats) {
const stats = modelStats[modelId];
rows.push(`| [![](https://xeokit.github.io/xeokit-xkt-utils/tests/models/xkt/${modelId}/screenshot/screenshot.png)](./tests/loadXKT.html?xktSrc=../${stats.xktDest}) | [${modelId}](./tests/loadXKT.html?xktSrc=../${stats.xktDest}) | ${stats.numObjects} | ${stats.numTriangles} | ${stats.numVertices} | ${stats.sourceSize} | ${stats.xktSize} | ${stats.compressionRatio} | ${stats.conversionTime} | ${stats.loadingTime} | ${stats.fps} |`);
rows.push(`| [![](https://xeokit.github.io/xeokit-xkt-utils/tests/models/xkt/${modelId}/screenshot/screenshot.png)](./tests/loadXKT.html?xktSrc=../${stats.xktDest}) | [${modelId}](./tests/loadXKT.html?xktSrc=../${stats.xktDest}) | ${stats.conversionTime} | ${stats.loadingTime} | ${stats.fps} | ${stats.numObjects} | ${stats.numTriangles} | ${stats.numVertices} | ${stats.sourceSize} | ${stats.xktSize} | ${stats.compressionRatio} |`);
}
const markdown = rows.join("\n");
return markdown;
Expand Down

0 comments on commit dcbfd2f

Please sign in to comment.