Skip to content

YMC-GitHub/sh-lib-caculate-cost-time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sh lib caculate cost time

desc

caculate the time you cost

feat

  • support ns
  • support start key
  • support end key
  • support mock

apis

  • cost_get
  • cost_set
  • recordTime
  • caculateTime
cat src/index.sh | grep "function " | sed "s/function */- [x] /g"  | sed "s/() *{//g"

how to use for poduction ?

# get the code

# run the index file
# ./index.sh

# or import to your sh file
# source /path/to/the/index file

# usage
recordTime "repalceContent"
sleep 61
caculateTime "repalceContent"

:<<output
repalceContent.start:2020-03-23 08:42:39
repalceContent.end:2020-03-23 08:43:40
repalceContent.cost:1m1s
output

how to use for developer ?

# get the code

# run test
./test.sh

author

yemiancheng ymc.github@gmail.com

license

MIT

About

shell lib caculate cost time

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages