mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 04:37:31 +08:00
add gc-test plugin (#597)
This commit is contained in:
28
plugins/wasm-go/extensions/gc-test/README.md
Normal file
28
plugins/wasm-go/extensions/gc-test/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
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.
|
||||
Reference in New Issue
Block a user