Skip to content

Commit

Permalink
增加获取网络资源 code 或者用时的方法
Browse files Browse the repository at this point in the history
  • Loading branch information
wxnacy committed Jun 17, 2019
1 parent cdcb81e commit 390e089
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.6
1.4.8
3 changes: 3 additions & 0 deletions bin/http/code
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

echo $(curl -sIL -w "%{http_code}" -o /dev/null $1)
4 changes: 4 additions & 0 deletions bin/http/time
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

curl -sIL -w "@${WS_HOME}/bin/http/time_format" -o /dev/null $1

8 changes: 8 additions & 0 deletions bin/http/time_format
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_redirect: %{time_redirect}\n
time_pretransfer: %{time_pretransfer}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
3 changes: 3 additions & 0 deletions conf/zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ source $ZSH/oh-my-zsh.sh
# unsetopt xtrace
# exec 2>&3 3>&-

if [ -f ~/.bash_profile ]; then
source ~/.bash_profile
fi
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
Expand Down

0 comments on commit 390e089

Please sign in to comment.