hfbzthesis/chapters/test.tex
2024-08-13 13:25:46 +08:00

32 lines
778 B
TeX
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

\chapter{基准测试}
\section{Go Test}
我们使用 Go Test 工具对成语接龙算法进行基准测试,结果如下:
\lstset{language = Bash, style = lgeneral}
\begin{lstlisting}
goos: linux
goarch: amd64
pkg: yigedinglia-backend
cpu: 13th Gen Intel(R) Core(TM) i5-13400F
BenchmarkSolitaire
BenchmarkSolitaire-16 114219 8939 ns/op
PASS
\end{lstlisting}
结果十分喜人,代表在最理想情况下,一次接龙操作耗时 8939 ns。
\section{Postman}
实际的生产环境不总是最理想的,以下为 Postman 的压力测试报告:
\begin{figure}[H]
\centering
\includegraphics[width=12cm]{postman.pdf}
\caption{}
\label{fig:postman}
\end{figure}
报告显示每秒能处理20.16个请求平均每个请求耗时3ms。