mirror of
https://github.com/alibaba/higress.git
synced 2026-03-04 00:20:50 +08:00
29 lines
945 B
Markdown
29 lines
945 B
Markdown
---
|
|
title: GC Test
|
|
keywords: [higress, gc test]
|
|
description: 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:
|
|
|
|
```bash
|
|
{"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.
|