This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import os | |
def curl_to_ab(curl_cmd: list, num: int=200, cur: int=4) -> str: | |
""" | |
Translate a cURL command created by Chrome's developer tools into a | |
command for ``ab``, the ApacheBench HTTP benchmarking tool. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ========= | |
" 功能函数 | |
" ========= | |
" 获取当前目录 | |
func GetPWD() | |
return substitute(getcwd(), "", "", "g") | |
endf | |
" ========= | |
" 环境配置 | |
" ========= |