mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 13:42:02 +08:00
commit
98650634a8
@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"time"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -12,6 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func PrefetchImages(confImgPath string, ExhaustPath string, QUALITY string) {
|
||||
var sTime = time.Now()
|
||||
// maximum ongoing prefetch is depending on your core of CPU
|
||||
log.Infof("Prefetching using %d cores", jobs)
|
||||
var finishChan = make(chan int, jobs)
|
||||
@ -41,7 +43,8 @@ func PrefetchImages(confImgPath string, ExhaustPath string, QUALITY string) {
|
||||
if err != nil {
|
||||
log.Debug(err)
|
||||
}
|
||||
|
||||
elapsed := time.Since(sTime)
|
||||
_, _ = fmt.Fprintf(os.Stdout, "Prefetch completeY(^_^)Y\n\n")
|
||||
_, _ = fmt.Fprintf(os.Stdout, "Convert %d file in %s (^_^)Y\n\n", count, elapsed)
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user