Skip to content

Commit

Permalink
doc (#3)
Browse files Browse the repository at this point in the history
* refactor(main): multi-threads
* Update README.md
  • Loading branch information
shvc authored Jul 23, 2019
1 parent 2f61fd0 commit 0aec890
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
# grf
gen random files
multi-threads gen random files

### Build from source or download prebuild binary
### Download
download prebuild binary
https://github.com/vager/grf/releases
or build from source
```
git clone https://github.com/cchare/grf.git
cd grf
go build -o grf
go build
```

### Usage
##### help page
```
./grf -h
Usage of ./grf:
-n int
-n uint
number of files (default 1)
-o string
output dir (default ".")
-p string
filename prefix (default "laod")
filename prefix (default "vager")
-s string
size(K,M,G,T) of file (default "1M")
-t int
threads (default 8)
-v show version
```

##### Generate 16 random files with size 2.2M to current dir
```
./grf -n 16 -s 2.2M
```

##### Generate 5 random files with size 2.22M to outdir/
##### Use 16 theads generate 16 random files to outdir/
```
mkdir outdir
./grf -n 5 -s 2.2M -o outdir
./grf -t 16 -n 16 -o outdir
```

0 comments on commit 0aec890

Please sign in to comment.