github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/dm/debug-tools/binlog-event-blackhole/README.md (about)

     1  
     2  ## Running
     3  
     4  ```bash
     5  ./binlog-event-blackhole -addr=127.0.0.1:3306 -u root -server-id=101 -binlog-name=mysql-bin.000003 -mode=1
     6  ```
     7  
     8  ```
     9    -L string
    10      	log level: debug, info, warn, error, fatal (default "info")
    11    -addr string
    12      	master's address
    13    -binlog-name string
    14      	startup binlog filename
    15    -binlog-pos int
    16      	startup binlog position (default 4)
    17    -log-file string
    18      	log file path
    19    -mode int
    20      	event read mode.
    21      	1: read packet with go-mysql;
    22      	2: read packet without go-mysql;
    23      	3: read binary data but do nothing
    24    -p username
    25      	password for username
    26    -server-id int
    27      	slave's server-id
    28    -u string
    29      	master's username
    30  ```
    31  
    32  ## Result
    33  
    34  When exiting, the result will be output to the log as following
    35  
    36  ```log
    37  [2019/08/12 15:44:19.269 +08:00] [INFO] [main.go:95] ["binlog-event-blackhole exit"] [event-count=35] [byte-count=2360] [duration=705.627314ms] [tps=49.601254522865595] ["throughput (byte/s)"=3344.541733541794]
    38  ```
    39  
    40  | Item | Description |
    41  |:------|:---- |
    42  | event-count | The total events have received from the upstream master |
    43  | byte-count | The total bytes have received from the upstream master |
    44  | duration | The duration has be taken to fetch binlog events |
    45  | tps | The events have received per second |
    46  | throughput | The throughput of fetching binlog event data (bytes/second) |