text: // Put in your main loop
  module.exports = {
      run: function() {
      
      if (Memory.stats == null || undefined) {
          Memory.stats = { tick: Game.time };
      }
  
      // Note: This is fragile and will change if the Game.cpu API changes
      Memory.stats.cpu = Game.cpu;
      // Memory.stats.cpu.used = Game.cpu.getUsed(); // AT END OF MAIN LOOP
  
      // Note: This is fragile and will change if the Game.gcl API changes
      Memory.stats.gcl = Game.gcl;
      
      const memory_used = RawMemory.get().length;
      // console.log('Memory used: ' + memory_used);
      Memory.stats.memory = {
          used: memory_used,
          // Other memory stats here?
      };
      }
  }
  