Files

title, keywords, description
title keywords description
GC Test
higress
gc test
use to test the gc of tinygo

Description

The gc-test plugin is used to test whether there are memory leaks in TinyGO's GC mechanism.

This plugin should not be used in production.

Configuration Fields

Name Type Requirement Default Value Description
bytes Number Required - Number of bytes allocated per-request

How to

The plugin will response the stats of memory as follows:

{"Sys": 15073280,"HeapSys": 10682368,"HeapIdle": 139264,"HeapInuse": 0,"HeapReleased": 0}

We can use bench tools to test whether the HeapSys field keeps growing, and then we can determine whether a memory leak has occurred.