You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by li...@apache.org on 2021/02/09 08:22:47 UTC

[skywalking-satellite] 01/01: polish docs

This is an automated email from the ASF dual-hosted git repository.

liujiapeng pushed a commit to branch polish-docs
in repository https://gitbox.apache.org/repos/asf/skywalking-satellite.git

commit 21521b5b835c4087dc7ecd3df33127e83a7d7ef5
Author: Evan <ev...@outlook.com>
AuthorDate: Tue Feb 9 16:22:06 2021 +0800

    polish docs
---
 Makefile                                           |  4 +-
 README.md                                          | 16 ++--
 cmd/command.go                                     | 11 ++-
 docs/README.md                                     | 19 +++++
 docs/configuration/queue.md                        | 11 ---
 docs/design/module_structure.md                    | 25 -------
 docs/en/FAQ/README.md                              |  3 +
 docs/en/FAQ/running_on_windows.md                  | 29 ++++++++
 docs/en/concepts-and-designs/README.md             | 13 ++++
 .../concepts-and-designs}/module_design.md         | 10 ++-
 docs/en/concepts-and-designs/overview.md           | 22 ++++++
 .../concepts-and-designs/plugin_mechanism.md}      |  0
 docs/en/concepts-and-designs/project-goals.md      | 16 ++++
 docs/en/concepts-and-designs/project_structue.md   | 33 +++++++++
 docs/en/guides/README.md                           |  6 ++
 docs/{ => en/guides}/compile/compile.md            | 16 ++--
 docs/en/guides/contribuation/plugin.md             | 42 +++++++++++
 docs/{ => en/guides}/test/test.md                  |  0
 docs/{ => en/plugins}/plugin-description.md        |  0
 docs/plugins/queue/mmap/README.md                  | 86 ----------------------
 docs/project_structue.md                           | 82 ---------------------
 internal/satellite/tools/generate_plugin_doc.go    |  6 +-
 22 files changed, 227 insertions(+), 223 deletions(-)

diff --git a/Makefile b/Makefile
index 5919891..214c868 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ GO_BUILD_FLAGS = -v
 GO_BUILD_LDFLAGS = -X main.version=$(VERSION)
 GQL_GEN = $(GO_PATH)/bin/gqlgen
 
-PLATFORMS := linux darwin
+PLATFORMS := linux darwin windows
 os = $(word 1, $@)
 ARCH = amd64
 
@@ -83,7 +83,7 @@ build: deps linux darwin
 
 .PHONY: check
 check: clean
-	$(OUT_DIR)/$(BINARY)-$(VERSION)-$(OSNAME)-$(ARCH) docs
+	$(OUT_DIR)/$(BINARY)-$(VERSION)-$(OSNAME)-$(ARCH) docs --output=docs/en/plugins
 	$(GO) mod tidy > /dev/null
 	@if [ ! -z "`git status -s`" ]; then \
 		echo "Following files are not consistent with CI:"; \
diff --git a/README.md b/README.md
index da4ac82..9de7b72 100644
--- a/README.md
+++ b/README.md
@@ -8,16 +8,22 @@ Apache SkyWalking Satellite
 [![GitHub stars](https://img.shields.io/github/stars/apache/skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/skywalking)
 [![Twitter Follow](https://img.shields.io/twitter/follow/asfskywalking.svg?style=for-the-badge&label=Follow&logo=twitter)](https://twitter.com/AsfSkyWalking)
 
-# Quick Start
-
 # Documentation
-- [The first design of Satellite 0.1.0](https://skywalking.apache.org/blog/2020-11-25-skywalking-satellite-0.1.0-design/)
-- [The project structure](./docs/project_structue.md)
+- [Official documentation](https://skywalking.apache.org/docs/)
+- [Blog](https://skywalking.apache.org/blog/2020-11-25-skywalking-satellite-0.1.0-design/) about the design of Satellite 0.1.0.
+
+NOTICE, SkyWalking Satellite uses [v3 protocols](https://github.com/apache/skywalking/blob/master/docs/en/protocols/README.md). They are incompatible with previous SkyWalking releases before SkyWalking 8.0.
 
 # Download
+Go to the [download page](https://skywalking.apache.org/downloads/) to download all available binaries, including MacOS and Linux.
+If you want to try the latest features or run on the Windows, however, you can compile the latest codes yourself, as the guide below. 
 
 # Compile
-[How to compile the Satellite.](./docs/compile/compile.md)
+As SkyWalking Satellite is using `Makefile`, compiling the project is as easy as executing a command in the root directory of the project.
+```makefile
+make build
+```
+Due to system compatibility problems, some plugins of SkyWalking Satellite cannot be used in Windows system. If you need to compile SkyWalking Satellite on Windows platform, please read [the doc](docs/en/guides/compile/compile.md).
 # Contact Us
 * Mail list: **dev@skywalking.apache.org**. Mail to `dev-subscribe@skywalking.apache.org`, follow the reply to subscribe the mail list.
 * Join `skywalking` channel at [Apache Slack](http://s.apache.org/slack-invite). If the link is not working, find the latest one at [Apache INFRA WIKI](https://cwiki.apache.org/confluence/display/INFRA/Slack+Guest+Invites).
diff --git a/cmd/command.go b/cmd/command.go
index e8c3f0b..2a96179 100644
--- a/cmd/command.go
+++ b/cmd/command.go
@@ -47,8 +47,17 @@ var (
 	cmdDocs = cli.Command{
 		Name:  "docs",
 		Usage: "generate satellite plugin docs",
+		Flags: []cli.Flag{
+			&cli.StringFlag{
+				Name:    "output, o",
+				Usage:   "The output path for the plugin documentation",
+				EnvVars: []string{"SATELLITE_DOC_PATH"},
+				Value:   "docs",
+			},
+		},
 		Action: func(c *cli.Context) error {
-			return tools.GeneratePluginDoc()
+			outputPath := c.String("output")
+			return tools.GeneratePluginDoc(outputPath)
 		},
 	}
 )
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..318f633
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,19 @@
+# Welcome
+**Here are SkyWalking Satellite official documentations. You're welcome to join us.**
+
+From here you can learn all about  **SkyWalking Satellite's** architecture, how to deploy and use SkyWalking Satellite.
+
+- [Concepts and Designs](en/concepts-and-designs/README.md). You'll find the most important core ideas about SkyWalking Satellite. You can learn from here if you want to understand what is going on under our cool features.
+- [Plugins description](en/plugins/plugin-description.md). You'll find the descriptions and the configurations of the whole plugins. 
+- [Guides](en/guides/README.md). You'll find how to develop or debug SkyWalking Satellite guides.
+
+- [Protocols](https://github.com/apache/skywalking/tree/master/docs/en/protocols/README.md). Protocols show the communication ways between agents/probes, Satellite and SkyWalking. Anyone interested in uplink telemetry data should definitely read this.
+
+- [Change logs](../CHANGES.md). The feature records of the different versions.
+
+- [FAQs](en/FAQ/README.md). A manifest of already known setup problems, secondary developments experiments. When you are facing a problem, check here first.
+
+We're always looking for help improving our documentation and codes, so please don’t hesitate to [file an issue](https://github.com/apache/skywalking/issues/new) 
+if you see any problem. 
+Or better yet, submit your own contributions through pull request to help make them better.
+
diff --git a/docs/configuration/queue.md b/docs/configuration/queue.md
deleted file mode 100644
index 3781b3b..0000000
--- a/docs/configuration/queue.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# queue configuration
-
-|  Type   | Param  | DefaultValue| Meaning| 
-|  ----  | ----  |----  | ----  |
-| mmap-queue  | segment_size | 131072 | The size of each segment(Unit:Byte). The minimum value is the system memory page size.
-| mmap-queue  | max_in_mem_segments | 10 | The max num of segments in memory. The minimum value is 4.
-| mmap-queue  | queue_capacity_segments | 4000 | The capacity of Queue = segment_size * queue_capacity_segments.
-| mmap-queue  | flush_period | 1000 | The period flush time. The unit is ms.
-| mmap-queue  | flush_ceiling_num | 10000 | The max number in one flush time.
-| mmap-queue  | queue_dir | satellite-mmap-queue |Contains all files in the queue.
-| mmap-queue  | max_event_size | 20480 |The max size of the input event(Unit:Byte).
diff --git a/docs/design/module_structure.md b/docs/design/module_structure.md
deleted file mode 100644
index 54899aa..0000000
--- a/docs/design/module_structure.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Module structure
-
-## Overview
-Module is the core workers in Satellite. Module is constituted by the specific extension plugins.
-There are 3 modules in one namespace, which are Gatherer, Processor, and Sender.
-
-- The Gatherer module is responsible for fetching or receiving data and pushing the data to Queue. So there are 2 kinds of Gatherer, which are ReceiverGatherer and FetcherGatherer.
-- The Processor module is responsible for reading data from the queue and processing data by a series of filter chains.
-- The Sender module is responsible for async processing and forwarding the data to the external services in the batch mode. After sending success, Sender would also acknowledge the offset of Queue in Gatherer.
-
-```
-                            Namespace
- --------------------------------------------------------------------
-|            ----------      -----------      --------               |
-|           | Gatherer | => | Processor | => | Sender |              |                          
-|            ----------      -----------      --------               |
- --------------------------------------------------------------------
-```
-
-## LifeCycle
-
-- Prepare: Prepare phase is to do some preparation works, such as register the client status listener to the client in ReceiverGatherer.
-- Boot: Boot phase is to start the current module until receives a close signal.
-- ShutDown: ShutDown phase is to close the used resources.
-
diff --git a/docs/en/FAQ/README.md b/docs/en/FAQ/README.md
new file mode 100644
index 0000000..f3ed6cf
--- /dev/null
+++ b/docs/en/FAQ/README.md
@@ -0,0 +1,3 @@
+## FAQ
+
+1. [How do we run Satellite on Windows?](./running_on_windows.md)
\ No newline at end of file
diff --git a/docs/en/FAQ/running_on_windows.md b/docs/en/FAQ/running_on_windows.md
new file mode 100644
index 0000000..74491d9
--- /dev/null
+++ b/docs/en/FAQ/running_on_windows.md
@@ -0,0 +1,29 @@
+# How do we run Satellite on Windows?
+
+Windows is not good supported beacuse [some features](../guides/compile/compile.md) is not adaptive on the Windows. Let's take the mmap component as an example to talk how to solve the problem.
+
+1. Remove package dependency. Let's open the SkyWalking-Satellite/plugins/queue/queue_repository.go, and delete the pointer line.
+```go
+// RegisterQueuePlugins register the used queue plugins.
+func RegisterQueuePlugins() {
+	plugin.RegisterPluginCategory(reflect.TypeOf((*api.Queue)(nil)).Elem())
+	queues := []api.Queue{
+		// Please register the queue plugins at here.
+		new(memory.Queue),
+		new(mmap.Queue), <=====Delete the line.
+	}
+	for _, q := range queues {
+		plugin.RegisterPlugin(q)
+	}
+}
+```
+2. Append the windows platform to the build script in the makefile.
+
+```
+.PHONY: build
+build: deps linux darwin windows
+```
+3. Execute the build command.
+```
+make build.
+```
\ No newline at end of file
diff --git a/docs/en/concepts-and-designs/README.md b/docs/en/concepts-and-designs/README.md
new file mode 100644
index 0000000..3999bce
--- /dev/null
+++ b/docs/en/concepts-and-designs/README.md
@@ -0,0 +1,13 @@
+# Concepts and Designs
+Concepts and Designs help you to learn and understand the SkyWalking Satellite and the landscape.
+
+- What is SkyWalking Satellite?
+  - [Overview and Core concepts](overview.md). Provides a high-level description and introduction, including the problems the project solves.
+  - [Project Goals](project-goals.md). Provides the goals, which SkyWalking Satellite is trying to focus and provide features about them.
+
+After you read the above documents, you should understand the SkyWalking basic goals. Now, you can choose which following parts 
+you are interested, then dive in.   
+
+- [Module Design](./module_design.md)
+- [Plugin mechanism](./plugin_mechanism.md)
+- [Project Structure](./project_structue.md)
diff --git a/docs/design/module_design.md b/docs/en/concepts-and-designs/module_design.md
similarity index 94%
rename from docs/design/module_design.md
rename to docs/en/concepts-and-designs/module_design.md
index 7217f94..f378d28 100644
--- a/docs/design/module_design.md
+++ b/docs/en/concepts-and-designs/module_design.md
@@ -18,7 +18,8 @@ Each pipe has one pipeline to process the telemetry data(metrics/traces/logs). T
  ---------------------------------------------------------------------
 ```
 ## Modules
-There are 3 modules in one pipe, which are Gatherer, Processor, and Sender.
+Module is the core workers in Satellite. Module is constituted by the specific extension plugins.
+There are 3 modules in one namespace, which are Gatherer, Processor, and Sender.
 
 - The Gatherer module is responsible for fetching or receiving data and pushing the data to Queue. So there are 2 kinds of Gatherer, which are ReceiverGatherer and FetcherGatherer.
 - The Processor module is responsible for reading data from the queue and processing data by a series of filter chains.
@@ -33,6 +34,13 @@ There are 3 modules in one pipe, which are Gatherer, Processor, and Sender.
  --------------------------------------------------------------------
 ```
 
+LifeCycle
+
+- Prepare: Prepare phase is to do some preparation works, such as register the client status listener to the client in ReceiverGatherer.
+- Boot: Boot phase is to start the current module until receives a close signal.
+- ShutDown: ShutDown phase is to close the used resources.
+
+
 ## Plugins
 
 Plugin is the minimal components in the module. Sateliite has 2 plugin catalogs, which are sharing plugins and normal plugins.
diff --git a/docs/en/concepts-and-designs/overview.md b/docs/en/concepts-and-designs/overview.md
new file mode 100644
index 0000000..31b209a
--- /dev/null
+++ b/docs/en/concepts-and-designs/overview.md
@@ -0,0 +1,22 @@
+# Overview
+SkyWalking Satellite: an open-source agent designed for the cloud-native infrastructures, which provides a low-cost, high-efficient, and more secure way to collect telemetry data, such that Trace Segments, Logs, or Metrics.
+ 
+
+## Why use SkyWalking Satellite?
+Observability is the solution to the complex scenario of cloud-native services. However, we may encounter different telemetry data scenarios, different language services, big data analysis, etc. Satellite provides a unified data collection layer for cloud-native services. 
+You can easily use it to connect to the SkyWalking ecosystem and enhance the capacity of SkyWalking. 
+There are some enhance features on the following when using Satellite.
+
+1. Provide a unified data collection layer to collect logs, traces, and metrics.
+2. Provide a safer local cache to reduce the memory cost of the service.
+3. Provide the unified transfer way shields the functional differences in the different language libs, such as MQ.
+4. Provides the preprocessing functions to ensure accuracy of the metrics, such as sampling.
+
+## Architecture
+SkyWalking Satellite is logically split into four parts: Gatherer, Processor, and Sender.
+
+<img src="https://skywalking.apache.org/blog/2020-11-25-skywalking-satellite-0.1.0-design/Satellite.png"/>
+
+- Gatherer collect data and reformat them for SkyWalking requirements.
+- Processor processes the input data to generate the new data for  Observability.
+- Sender would transfer the downstream data to the SkyWalking OAP with different protocols.
\ No newline at end of file
diff --git a/docs/design/plugin_structure.md b/docs/en/concepts-and-designs/plugin_mechanism.md
similarity index 100%
rename from docs/design/plugin_structure.md
rename to docs/en/concepts-and-designs/plugin_mechanism.md
diff --git a/docs/en/concepts-and-designs/project-goals.md b/docs/en/concepts-and-designs/project-goals.md
new file mode 100644
index 0000000..b49cf68
--- /dev/null
+++ b/docs/en/concepts-and-designs/project-goals.md
@@ -0,0 +1,16 @@
+# Design Goals
+The document outlines the core design goals for SkyWalking Satellite project.
+
+- **Light Weight**. SkyWalking Satellite has a limited cost for resources and high-performance because of the requirements of the sidecar deployment model.
+
+- **Pluggable**. SkyWalking Satellite core team provides many default implementations, but definitely it is not enough,
+and also don't fit every scenario. So, we provide a lot of features for being pluggable. 
+
+- **Portability**.  SkyWalking Satellite can run in multiple environments, including: 
+    - Use traditional deployment as a demon process to collect data.
+    - Use cloud services as a sidecar, such as in the kubernetes platform.
+
+- **Interop**.   Observability is a big landscape, SkyWalking is impossible to support all, even by its community. So Skywalking Satellite is compatible with many protocols, including: 
+    - SkyWalking protocol
+    - (WIP) Prometheus protocol.
+
diff --git a/docs/en/concepts-and-designs/project_structue.md b/docs/en/concepts-and-designs/project_structue.md
new file mode 100644
index 0000000..9f882e4
--- /dev/null
+++ b/docs/en/concepts-and-designs/project_structue.md
@@ -0,0 +1,33 @@
+# Project Structure
+- cmd: The starter of Satellite.
+- configs: Satellite configs.
+- internal: Core, Api, and common utils.
+    - internal/pkg: Sharing with Core and Plugins, such as api and utils.
+    - internal/satellite: The core of Satellite.
+- plugins: Contains all plugins.
+    - plugins/{type}: Contains the plugins of this {type}. Satellite has 9 plugin types.
+    - plugins/{type}/api: Contains the plugin definition and initializer.
+    - plugins/{type}/{plugin-name}: Contains the specific plugin.
+    - init.go: Register the plugins to the plugin registry.
+```
+.
+├── CHANGES.md
+├── cmd
+├── configs
+├── docs
+├── go.sum
+├── internal
+│   ├── pkg
+│   └── satellite
+├── plugins
+│   ├── client
+│   ├── fallbacker
+│   ├── fetcher
+│   ├── filter
+│   ├── forwarder
+│   ├── init.go
+│   ├── parser
+│   ├── queue
+│   ├── receiver
+│   └── server
+```
diff --git a/docs/en/guides/README.md b/docs/en/guides/README.md
new file mode 100644
index 0000000..ca7a87f
--- /dev/null
+++ b/docs/en/guides/README.md
@@ -0,0 +1,6 @@
+# Guides
+If you want to debug or develop SkyWalking Satellite, The following documentations would guide you.
+
+- [How to contribute the plugins?](./contribuation/plugin.md)
+- [How to add unit test in the plugins?](./test/test.md)
+- [How to compile SkyWalking Satellite?](./compile/compile.md)
diff --git a/docs/compile/compile.md b/docs/en/guides/compile/compile.md
similarity index 54%
rename from docs/compile/compile.md
rename to docs/en/guides/compile/compile.md
index 1d0d115..389db68 100644
--- a/docs/compile/compile.md
+++ b/docs/en/guides/compile/compile.md
@@ -1,10 +1,12 @@
 # Compile
-## command
-```
-make build
-```
-## platform
-Linux and MacOs is supported in SkyWalking Satellite. Windows is not good supported beacuse some features is not adaptive on the Windows, such as the mmap feature. 
+
+## Platform
+Linux and MacOs is supported in SkyWalking Satellite. Windows is not good supported beacuse some features is not adaptive on the Windows, such as the mmap feature. If you want to run it on the windows platform, please read [it](../../FAQ/running_on_windows.md)
 
 The Windows platform does not support plugins list:
-1. mmap-queue
\ No newline at end of file
+1. mmap-queue
+
+## Command
+```
+make build
+```
\ No newline at end of file
diff --git a/docs/en/guides/contribuation/plugin.md b/docs/en/guides/contribuation/plugin.md
new file mode 100644
index 0000000..ffbd624
--- /dev/null
+++ b/docs/en/guides/contribuation/plugin.md
@@ -0,0 +1,42 @@
+# How to write a new plugin?
+If you want to add a custom plugin in SkyWalking Satellite, the following contents would guide you.
+Let's use memory-queue as an example of how to write a plugin.
+
+1. Choose the plugin category. According to the memory-queue is a queue, the plugin should be write in the **skywalking-satellite/plugins/queue** directory. So we create a new directory called memory as the plugin codes space.  
+
+2. Implement the interface in the **skywalking-satellite/plugins/queue/api**. Each plugin has 3 common methods, which are Name(), Description(), DefaultConfig().
+    - Name() returns the unique name in the plugin category.
+    - Description() returns the description of the plugin, which would be used to generate the plugin documentation.
+    - DefaultConfig() returns the default plugin config with yaml pattern, which would be used as the default value in the plugin struct and to generate the plugin documentation.
+    ```go
+    type Queue struct {
+    	config.CommonFields
+    	// config
+    	EventBufferSize int `mapstructure:"event_buffer_size"` // The maximum buffer event size.
+    
+    	// components
+    	buffer *goconcurrentqueue.FixedFIFO
+    }
+    
+    func (q *Queue) Name() string {
+    	return Name
+    }
+    
+    func (q *Queue) Description() string {
+    	return "this is a memory queue to buffer the input event."
+    }
+    
+    func (q *Queue) DefaultConfig() string {
+    	return `
+    # The maximum buffer event size.
+    event_buffer_size: 5000
+    ```
+   
+3. Add [unit test](../test/test.md).
+4. Generate the plugin docs.
+```shell script
+make check
+```
+
+
+
diff --git a/docs/test/test.md b/docs/en/guides/test/test.md
similarity index 100%
rename from docs/test/test.md
rename to docs/en/guides/test/test.md
diff --git a/docs/plugin-description.md b/docs/en/plugins/plugin-description.md
similarity index 100%
rename from docs/plugin-description.md
rename to docs/en/plugins/plugin-description.md
diff --git a/docs/plugins/queue/mmap/README.md b/docs/plugins/queue/mmap/README.md
deleted file mode 100644
index 1b76412..0000000
--- a/docs/plugins/queue/mmap/README.md
+++ /dev/null
@@ -1,86 +0,0 @@
-# Design
-The mmap-queue is a big, fast, and persistent queue based on the memory-mapped files. One mmap-queue has a directory to store the whole data. The queue directory is made up of many segments and 1 metafile. This is originally implemented by [bigqueue](https://github.com/grandecola/bigqueue) project, we changed it a little for fitting the Satellite project requirements.
-
-- Segment: Segment is the real data store center, that provides large-space storage and does not reduce read and write performance as much as possible by using mmap. And we will avoid deleting files by reusing them.
-- Meta: The purpose of meta is to find the data that the consumer needs.
-
-## Meta
-Metadata only needs 80B to store the Metadata for the pipe. But for memory alignment, it takes at least one memory page size, which is generally 4K.
-```
-[    8Bit   ][  8Bit ][  8Bit ][  8Bit ][  8Bit ][  8Bit ][  8Bit ][  8Bit ][  8Bit ][  8Bit  ]
-[metaVersion][  ID   ][ offset][  ID   ][ offset][  ID   ][ offset][  ID   ][ offset][capacity]
-[metaVersion][writing   offset][watermark offset][committed offset][reading   offset][capacity]
-
-```
-### Transforming
-
-![](https://skywalking.apache.org/blog/2020-11-25-skywalking-satellite-0.1.0-design/offset-convert.jpg)
-
-## Configuration
-[Configuration Params](../../../configuration/queue.md)
-
-## Segment
-Segments are a series of files of the same size. Each input data would cost `8Bit+Len(data)Bit` to store the raw bytes. The first 8Bit is equal to `Len(data)` for finding the ending position. 
-### Swapper
-For the performance and resources thinking, we define a page replacement policy.
-
-- Keep the reading and writing segments on the memory.
-- When the mmapcount is greater or equals to the max_in_mem_segments, we first scan the read scope and then scan the written scope to swap the segments to promise the reading or writing segments are always in memory.
-    - Read scope: [reading_offset - max_in_mem_segments,reading_offset - 1]
-    - Written scope: [writing_offset - max_in_mem_segments,writing_offset - 1]
-    - Each displacement operation guarantees at least `max_in_mem_segments/2-1` capacity available. Subtract operation to subtract the amount of memory that must always exist.
-
-## BenchmarkTest
-Test machine: macbook pro 2018
-
-```
-Model Name:	MacBook Pro
-Model Identifier:	MacBookPro15,1
-Processor Name:	6-Core Intel Core i7
-Processor Speed:	2.2 GHz
-Number of Processors:	1
-Total Number of Cores:	6
-L2 Cache (per Core):	256 KB
-L3 Cache:	9 MB
-Hyper-Threading Technology:	Enabled
-Memory:	16 GB
-System Firmware Version:	1554.60.15.0.0 (iBridge: 18.16.13030.0.0,0
-```
-
-### enqueue operation
-
-```
-goos: darwin
-goarch: amd64
-pkg: github.com/apache/skywalking-satellite/plugins/queue/mmap
-BenchmarkEnqueue
-BenchmarkEnqueue/segmentSize:_128KB_maxInMemSegments:10_message:8KB_queueCapacity:10000
-BenchmarkEnqueue/segmentSize:_128KB_maxInMemSegments:10_message:8KB_queueCapacity:10000-12         	   45946	     28185 ns/op	    9884 B/op	       9 allocs/op
-BenchmarkEnqueue/segmentSize:_256KB_maxInMemSegments:10_message:8KB_queueCapacity:10000
-BenchmarkEnqueue/segmentSize:_256KB_maxInMemSegments:10_message:8KB_queueCapacity:10000-12         	   68137	     19142 ns/op	    9838 B/op	       9 allocs/op
-BenchmarkEnqueue/segmentSize:_128KB_maxInMemSegments:20_message:8KB_queueCapacity:10000
-BenchmarkEnqueue/segmentSize:_128KB_maxInMemSegments:20_message:8KB_queueCapacity:10000-12         	   47361	     22318 ns/op	    9884 B/op	       9 allocs/op
-BenchmarkEnqueue/segmentSize:_128KB_maxInMemSegments:10_message:16KB_queueCapacity:10000
-BenchmarkEnqueue/segmentSize:_128KB_maxInMemSegments:10_message:16KB_queueCapacity:10000-12        	   24478	     45501 ns/op	   18934 B/op	      10 allocs/op
-BenchmarkEnqueue/segmentSize:_128KB_maxInMemSegments:10_message:8KB_queueCapacity:100000
-BenchmarkEnqueue/segmentSize:_128KB_maxInMemSegments:10_message:8KB_queueCapacity:100000-12        	   45691	     29413 ns/op	    9884 B/op	       9 allocs/op
-PASS
-```
-### enqueue and dequeue operation
-```
-goos: darwin
-goarch: amd64
-pkg: github.com/apache/skywalking-satellite/plugins/queue/mmap
-BenchmarkEnqueueAndDequeue
-BenchmarkEnqueueAndDequeue/segmentSize:_128KB_maxInMemSegments:10_message:8KB_queueCapacity:10000
-BenchmarkEnqueueAndDequeue/segmentSize:_128KB_maxInMemSegments:10_message:8KB_queueCapacity:10000-12         	   30657	     34182 ns/op	   28725 B/op	      41 allocs/op
-BenchmarkEnqueueAndDequeue/segmentSize:_256KB_maxInMemSegments:10_message:8KB_queueCapacity:10000
-BenchmarkEnqueueAndDequeue/segmentSize:_256KB_maxInMemSegments:10_message:8KB_queueCapacity:10000-12         	   34617	     31619 ns/op	   28677 B/op	      41 allocs/op
-BenchmarkEnqueueAndDequeue/segmentSize:_128KB_maxInMemSegments:20_message:8KB_queueCapacity:10000
-BenchmarkEnqueueAndDequeue/segmentSize:_128KB_maxInMemSegments:20_message:8KB_queueCapacity:10000-12         	   32440	     38439 ns/op	   28726 B/op	      41 allocs/op
-BenchmarkEnqueueAndDequeue/segmentSize:_128KB_maxInMemSegments:10_message:16KB_queueCapacity:10000
-BenchmarkEnqueueAndDequeue/segmentSize:_128KB_maxInMemSegments:10_message:16KB_queueCapacity:10000-12        	   18554	     56840 ns/op	   54931 B/op	      42 allocs/op
-BenchmarkEnqueueAndDequeue/segmentSize:_128KB_maxInMemSegments:10_message:8KB_queueCapacity:100000
-BenchmarkEnqueueAndDequeue/segmentSize:_128KB_maxInMemSegments:10_message:8KB_queueCapacity:100000-12        	   27303	     40016 ns/op	   28725 B/op	      41 allocs/op
-PASS
-```
diff --git a/docs/project_structue.md b/docs/project_structue.md
deleted file mode 100644
index 8aefe8a..0000000
--- a/docs/project_structue.md
+++ /dev/null
@@ -1,82 +0,0 @@
-# Project Structure
-- configs: Satellite configs.
-- internal: Core, Api, and common utils.
-- internal/pkg: Sharing with Core and Plugins, such as api and utils.
-- internal/satellite: The core of Satellite.
-- plugins: Contains all plugins.
-- plugins/{type}: Contains the plugins of this {type}. Satellite has 9 plugin types.
-- plugins/api: Contains the plugin definition and initlizer.
-- plugins/{type}/{plugin-name}: Contains the specific plugin, and {plugin-name}-{type} would be registered as the plugin unique name in the registry. 
-```
-.
-├── cmd
-│   ├── command.go
-│   └── main.go
-├── configs
-│   └── satellite_config.yaml
-├── docs
-│   ├── design
-│   │   ├── module_design.md
-│   │   ├── module_structure.md
-│   │   └── plugin_structure.md
-│   └── project_structue.md
-├── internal
-│   ├── container
-│   ├── pkg
-│   │   ├── event
-│   │   ├── log
-│   │   ├── plugin
-│   │   │   ├── definition.go
-│   │   │   ├── plugin_test.go
-│   │   │   └── registry.go
-│   └── satellite
-│       ├── boot
-│       │   └── boot.go
-│       ├── config
-│       ├── event
-│       ├── module
-│       │   ├── api
-│       │   ├── buffer
-│       │   ├── gatherer
-│       │   ├── processor
-│       │   └── sender
-│       └── sharing
-└── plugins
-    ├── client
-    │   ├── api
-    │   │   ├── client.go
-    │   │   └── client_repository.go
-    ├── fallbacker
-    │   ├── api
-    │   │   ├── fallbacker.go
-    │   │   └── fallbacker_repository.go
-    ├── fetcher
-    │   └── api
-    │       ├── fetcher.go
-    │       └── fetcher_repository.go
-    ├── filter
-    │   ├── api
-    │   │   ├── filter.go
-    │   │   └── filter_repository.go
-    ├── forwarder
-    │   ├── api
-    │   │   ├── forwarder.go
-    │   │   └── forwarder_repository.go
-    ├── init.go
-    ├── parser
-    │   ├── api
-    │   │   ├── parser.go
-    │   │   └── parser_repository.go
-    ├── queue
-    │   ├── api
-    │   │   ├── queue.go
-    │   │   └── queue_repository.go
-    ├── receiver
-    │   ├── api
-    │   │   ├── receiver.go
-    │   │   └── receiver_repository.go
-    └── server
-        └── api
-            ├── server.go
-            └── server_repository.go
-```
diff --git a/internal/satellite/tools/generate_plugin_doc.go b/internal/satellite/tools/generate_plugin_doc.go
index 3dd3fda..355ad73 100644
--- a/internal/satellite/tools/generate_plugin_doc.go
+++ b/internal/satellite/tools/generate_plugin_doc.go
@@ -32,7 +32,7 @@ import (
 
 const (
 	docDir         = "docs"
-	docPath        = docDir + "/plugin-description.md"
+	docName        = "plugin-description.md"
 	topLevel       = "# "
 	SecondLevel    = "## "
 	thirdLevel     = "### "
@@ -43,7 +43,7 @@ const (
 	confStr        = "defaultConfig"
 )
 
-func GeneratePluginDoc() error {
+func GeneratePluginDoc(docDir string) error {
 	log.Init(&log.LoggerConfig{})
 	plugins.RegisterPlugins()
 	// the generated doc content
@@ -74,7 +74,7 @@ func GeneratePluginDoc() error {
 	if err := createDir(docDir); err != nil {
 		return fmt.Errorf("create docs dir error: %v", err)
 	}
-	if err := ioutil.WriteFile(docPath, []byte(doc), os.ModePerm); err != nil {
+	if err := ioutil.WriteFile(docDir+"/"+docName, []byte(doc), os.ModePerm); err != nil {
 		return fmt.Errorf("cannot init the plugin doc: %v", err)
 	}
 	log.Logger.Info("Successfully generate documentation!")