# 11 代码测试，优化及分析

- [11.1 本章使用的Go版本](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.1-ben-zhang-shi-yong-de-go-ban-ben.md)
- [11.1.1 1.10和1.9版本对比](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.1.1-1.10-he-1.9-ban-ben-dui-bi.md)
- [11.2 安装beta或者RC版本](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.2-an-zhuang-beta-huo-zhe-rc-ban-ben.md)
- [11.3 关于优化](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.3-guan-yu-you-hua.md)
- [11.4 优化你的Go代码](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.4-you-hua-ni-de-go-dai-ma.md)
- [11.5 分析Go代码](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.5-fen-xi-go-dai-ma.md)
- [11.5.1 标准库net/http/pprof](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.5-fen-xi-go-dai-ma/11.5.1-biao-zhun-ku-nethttppprof.md)
- [11.5.2 代码分析示例](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.5-fen-xi-go-dai-ma/11.5.2-dai-ma-fen-xi-shi-li.md)
- [11.5.3 用于分析的第三方包](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.5-fen-xi-go-dai-ma/11.5.3-yong-yu-fen-xi-de-di-san-fang-bao.md)
- [11.5.4 Go分析器的web接口](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.5-fen-xi-go-dai-ma/11.5.4-go-fen-xi-qi-de-web-jie-kou.md)
- [11.5.4.1 使用web接口的分析示例](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.5-fen-xi-go-dai-ma/11.5.4-go-fen-xi-qi-de-web-jie-kou/11.5.4.1-shi-yong-web-jie-kou-de-fen-xi-shi-li.md)
- [11.5.4.2 Graphviz快览](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.5-fen-xi-go-dai-ma/11.5.4-go-fen-xi-qi-de-web-jie-kou/11.5.4.2-graphviz-kuai-lan.md)
- [11.6 go tool的代码追踪](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.6-go-tool-de-dai-ma-zhui-zong.md)
- [11.7 测试](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.7-ce-shi.md)
- [11.7.1 编程测试代码](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.7-ce-shi/11.7.1-bian-cheng-ce-shi-dai-ma.md)
- [11.8 基准测试](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.8-ji-zhun-ce-shi.md)
- [11.8.1 基准测试示例](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.8-ji-zhun-ce-shi/11.8.1-ji-zhun-ce-shi-shi-li.md)
- [11.8.2 错误的基准测试函数](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.8-ji-zhun-ce-shi/11.8.2-cuo-wu-de-ji-zhun-ce-shi-han-shu.md)
- [11.9 基准测试的缓冲写入](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.9-ji-zhun-ce-shi-de-huan-chong-xie-ru.md)
- [11.10 揪出隐藏的代码](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.10-jiu-chu-yin-cang-de-dai-ma.md)
- [11.11 交叉编译](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.11-jiao-cha-bian-yi.md)
- [11.12 创建示例函数](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.12-chuang-jian-shi-li-han-shu.md)
- [11.13 生成文档](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.13-sheng-cheng-wen-dang.md)
- [11.14 延展阅读](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.14-yan-zhan-yue-du.md)
- [11.15 练习](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.15-lian-xi.md)
- [11.16 本章小结](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi/11.16-ben-zhang-xiao-jie.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wskdsgcf.gitbook.io/mastering-go-zh-cn/11-dai-ma-ce-shi-you-hua-ji-fen-xi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
