Update Envoy version to 8817b5f (Apr 6th) (#1516)
- Update NH to the latest Envoy.
- Implement
initManagerinsource/client/process_impl.ccto accommodate https://github.com/envoyproxy/envoy/pull/44100.- Include a
--pathargument totools/check_format.shto resolve a Bazel failure after running the newly added rust format check in https://github.com/envoyproxy/envoy/pull/44131.- Skip assertion in
source/client/flush_worker_impl.ccas a workaround to accommodate the newly introduced assertion in https://github.com/envoyproxy/envoy/pull/44015.Signed-off-by: jiajunye jiajunye@google.com Signed-off-by: Jason Ye jiajunye@google.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
Nighthawk
A L7 (HTTP/HTTPS/HTTP2) performance characterization tool
Current state
Nighthawk currently offers:
Navigating the codebase
See navigating the codebase for a description of the directory structure.
Additional Documentation
See the howto directory for documentation aimed at specific use-cases.
Building Nighthawk
Prerequisites
Note that Nighthawk uses Envoy’s code directly, so building Envoy is a prerequisite for building Nighthawk. Start by looking at Envoy’s building documentation.
Compiler requirements
The main supported way of building Nighthawk is with the Clang compiler. At least Clang/LLVM 12+ is needed to successfully build Nighthawk.
Bazel
Both Envoy and Nighthawk use the Bazel build tool. The steps required to set up Bazel are documented in Envoy’s Quick start Bazel build for developers.
Building on Ubuntu
This section outlines the steps needed to build on Ubuntu. Note that these steps include commands that are documented in the prerequisites section above.
Install required packages
Run the following command to install the required packages.
Install Clang/LLVM
Note that depending on the chosen Ubuntu version, you may need to manually install a never version of Clang/LLVM. The installed version of Clang can be verified by running:
If you do need to install a newer version, be sure to use Ubuntu’s
update-alternativesor a similar approach to switch to using the newer Clang/LLVM. See issue#832 for one possible approach.Run the following commands to install Clang/LLVM.
Install Bazelisk instead of bazel
Bazelisk is recommended, since it automatically chooses and downloads the appropriate Bazel version. If you already have Bazel installed, it is strongly recommended to remove it.
Run the following to remove bazel.
Run the following to install Bazelisk.
Clone Nighthawk and setup Clang as the compiler
Run the following to clone the Nighthawk repository and instruct Bazel to use Clang.
Install Python libraries
It is advisable to use the same version of Python as the one listed at the top of
tools/base/requirements.txt. While other versions may also work, the chances of success are greatest if using the same one.Recommended: Use
virtualenvto avoid conflicts between Nighthawk’s Python package version requirements and other versions already on your system:Note: Avoid creating the environment under the Nighthawk project directory.
Install Python packages required for Nighthawk (whether using
virtualenvor not):If
pip3 installfails, you will need to troubleshoot the Python environment before attempting to build and test Nighthawk.Build and testing Nighthawk
You can now use the CI script to build Nighthawk.
Or to execute its tests.
Note that after building completes, the Nighthawk binaries are located in the
bazel-bin/directory located at the root of the cloned Nighthawk repository.Using the Nighthawk client CLI
For using the Nighthawk test server, see here.
Nighthawk gRPC service
The gRPC service can be used to start a server which is able to perform back-to-back benchmark runs upon request. The service interface definition can be found here.
Nighthawk output transformation utility
Nighthawk comes with a tool to transform its json output to its other supported output formats.
Example: transform json output to fortio compatible format
A sample benchmark run
Visualizing the output of a benchmark
Nighthawk supports transforming the output into other well-known formats, such as:
dotted: Provides integration with Prometheusfortio: Provides integration with Fortio’s report-only UIThe following is an example of a nighthawk benchmark visualized via the Fortio UI.
Accuracy and repeatability considerations when using the Nighthawk client
tasksetto isolate client and server. On machines with multiple physical CPUs there is a choice here. You can partition client and server on the same physical processor, or run each of them on a different physical CPU. Be aware of the latency effects of interconnects such as QPI.