View internal statistics related to the Best HTTP/2 plugin, integrated into the Unity Profiler window.


Steps to install and setup:

  1. The profiler addon has a dependency on the com.unity.profiling.core that requires Unity 2020.1 or newer installations.
  2. Make sure that the Best HTTP/2 package is already installed.

  3. Using the Package Manager window install the package from the following git source:

    Add Package from Git URL

  4. Create a new GameObject in your scene and add the DataCollector component:

    DataCollector GameObject

Network Profiler

Network profiler overview

Collected fields:

  • Sent: Sent bytes since the previous frame.
  • Sent Total: Total bytes sent by the plugin.
  • Received: Received bytes since the previous frame.
  • Received Total: Total bytes received.
  • Open Connections: Currently open connections. An open connection might be an idle connection that have no active request/response to process.
  • Total Connections: Total connections, including open ones too.

Memory Profiler

Memory profiler overview

Collected fields:

  • Borrowed: Borrowed memory from the BufferPool.
  • Pooled: Memory in the BufferPool available to borrow.
  • Array Allocations: Total number of byte[] allocations through the BufferPool. An allocation occurs when there’s no suitable byte[] in the pool to borrow. If it’s constantly growing, increasing BufferPool.MaxPoolSize might be a good idea.

Data Collection

There are two ways to collect data for the profiler. The first one is to use the DataCollector component attached to a GameObject. The seconds method is to use the ProfilerUpdater directly from code. ProfilerUpdater.Attach() can be used to start collecting, its best place is somewhere in a startup code before any other plugin releated calls. ProfilerUpdater.Detach() can be used to stop data collection.