HISE Logo Forum
    • Categories
    • Register
    • Login

    Performance meter customisation

    Scheduled Pinned Locked Moved Scripting
    3 Posts 2 Posters 670 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey
      last edited by

      I would like to customise the performance meter, I want to add some more text to it. The floating tile docs say to use the individual calls such as Engine.getCpuUsage() however those calls don't update in real-time like the default performance meter does.

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        Actually the performance meter is just a label with a timer so you can roll your own versiom pretty easily.

        I‘d recommend writing a custom Panel for this, this way you can also implement bar meters, anither layout etc.

        1 Reply Last reply Reply Quote 2
        • d.healeyD
          d.healey
          last edited by d.healey

          Thank you. For anyone else who comes across this, here is what I've done.

          const var pnlStats = Content.getComponent("pnlStats");
          const var lblStats = Content.getComponent("lblStats");
          pnlStats.startTimer(250);
          
          pnlStats.setTimerCallback(function()
          {        
              lblStats.set("text", "CPU: " + Math.round(Engine.getCpuUsage()) + "%" + ", " + "RAM: " + Math.round(Engine.getMemoryUsage()) + "MB" + ", " + "Voices: " + Engine.getNumVoices());
          });
          
          

          Is Engine.doubleToString() faster than Math.round()?

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          1 Reply Last reply Reply Quote 2
          • First post
            Last post

          50

          Online

          1.7k

          Users

          11.7k

          Topics

          101.8k

          Posts