Skip to main content
100%

Gist 24579e225fd76065b0ac0e72b36ea31b

✓ Published0🌍 Public
WWill Carter
Last edited Jan 28, 2021
Created on Jan 28, 2021

This example demonstrates a performance profiling visualization for a force-directed graph simulation. It shows how long the `returnLast` function takes to execute on a dataset of star objects, displaying the elapsed time in milliseconds alongside console output. The visualization uses D3.js’s `d3.forceSimulation` to animate the graph, while custom timing logic captures start and end timestamps via `Date.now()` to measure iteration performance. The code logs the star count and elapsed time to the console, iterating through multiple frames to track timing variations. The rendering approach relies on D3’s simulation engine, with the data source being a static array of star objects defined in the script.

AI-generated description

Similar vizzes