---
title: 运行测试脚本
description: "本次测试Yahoo工具的目录在“/opt/yahoo-streaming-benchmark”。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengbds/testguide/tstg/kunpengbdsysb_11_0007.html
sourcePath: /source/zh/kunpengbds/testguide/tstg/kunpengbdsysb_11_0007.html
indexId: 64d70be20ec0a09fd6cb1499735f9b58ae7695c8daa4b94d4651dc03aede3dc963
---
# 运行测试脚本

#### 使用Yahoo自带的Flink和Kafka

本次测试Yahoo工具的目录在“/opt/yahoo-streaming-benchmark”。

1. 生成benchmarkConf.yaml配置文件。
  1 2 cd /opt/yahoo-streaming-benchmark ./stream-bench.sh SETUP

2. 测试Flink性能。
  1 ./stream-bench.sh FLINK_TEST


#### 使用自定义的Flink和Kafka

使用前请先启动Kafka。


1. 进入测试Yahoo工具的目录“/opt/yahoo-streaming-benchmark”。
  1 cd /opt/yahoo-streaming-benchmark

2. 修改stream-bench.sh脚本。

  a. 打开脚本。
    1 vi stream-bench.sh

  b. 按“i”进入编辑模式，需要注释掉如下三行代码。

```
# run "START_ZK"
# run "STOP_KAFKA"
# run "STOP_ZK"
```


  c. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
3. 生成benchmarkConf.yaml配置文件。
  1 2 cd /opt/yahoo-streaming-benchmark ./stream-bench.sh SETUP

4. 测试Flink性能。
  1 ./stream-bench.sh FLINK_TEST
