@@ -20,17 +20,17 @@ async function main() {
2020 console . log ( 'Creating sample metrics...' ) ;
2121
2222 // Add some single-value metrics
23- metrics . pushStat ( 'fps' , 60 , 'Frames Per Second' ) ;
24- metrics . pushStat ( 'frame_time' , 16.67 , 'Frame Time in milliseconds' ) ;
25- metrics . pushStat ( 'memory_used' , 512.5 , 'Memory Usage in MB' ) ;
26- metrics . pushStat ( 'cpu_usage' , 45.3 , 'CPU Usage Percentage' ) ;
23+ metrics . storeStat ( 'fps' , 60 , 'Frames Per Second' ) ;
24+ metrics . storeStat ( 'frame_time' , 16.67 , 'Frame Time in milliseconds' ) ;
25+ metrics . storeStat ( 'memory_used' , 512.5 , 'Memory Usage in MB' ) ;
26+ metrics . storeStat ( 'cpu_usage' , 45.3 , 'CPU Usage Percentage' ) ;
2727
2828 // Add grouped metrics (simulating multiple players)
2929 const players = [ 'player0' , 'player1' , 'player2' ] ;
3030 players . forEach ( ( player , index ) => {
31- metrics . pushStatByGroup ( player , 'score' , ( index + 1 ) * 1000 , 'Player Score' ) ;
32- metrics . pushStatByGroup ( player , 'ping' , 20 + index * 10 , 'Player Ping in ms' ) ;
33- metrics . pushStatByGroup ( player , 'health' , 100 - index * 10 , 'Player Health' ) ;
31+ metrics . storeStatByGroup ( player , 'score' , ( index + 1 ) * 1000 , 'Player Score' ) ;
32+ metrics . storeStatByGroup ( player , 'ping' , 20 + index * 10 , 'Player Ping in ms' ) ;
33+ metrics . storeStatByGroup ( player , 'health' , 100 - index * 10 , 'Player Health' ) ;
3434 } ) ;
3535
3636 // Display the JSON payload
0 commit comments