Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: client/cmd/isolate/common.go

Issue 1149823004: Set GOMAXPROCS=runtime.NumCPU(). (Closed) Base URL: git@github.com:luci/luci-go@4_drop_tid
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | client/cmd/isolated/common.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import ( 7 import (
8 "errors" 8 "errors"
9 "flag" 9 "flag"
10 "fmt" 10 "fmt"
11 "runtime"
11 12
12 "github.com/luci/luci-go/client/internal/common" 13 "github.com/luci/luci-go/client/internal/common"
13 "github.com/luci/luci-go/client/isolate" 14 "github.com/luci/luci-go/client/isolate"
14 "github.com/luci/luci-go/client/isolatedclient" 15 "github.com/luci/luci-go/client/isolatedclient"
15 "github.com/maruel/subcommands" 16 "github.com/maruel/subcommands"
16 ) 17 )
17 18
19 func init() {
20 runtime.GOMAXPROCS(runtime.NumCPU())
21 }
22
18 type commonFlags struct { 23 type commonFlags struct {
19 subcommands.CommandRunBase 24 subcommands.CommandRunBase
20 defaultFlags common.Flags 25 defaultFlags common.Flags
21 } 26 }
22 27
23 func (c *commonFlags) Init() { 28 func (c *commonFlags) Init() {
24 c.defaultFlags.Init(&c.Flags) 29 c.defaultFlags.Init(&c.Flags)
25 } 30 }
26 31
27 func (c *commonFlags) Parse() error { 32 func (c *commonFlags) Parse() error {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 111
107 if flags&RequireIsolateFile != 0 && c.Isolate == "" { 112 if flags&RequireIsolateFile != 0 && c.Isolate == "" {
108 return errors.New("-isolate must be specified") 113 return errors.New("-isolate must be specified")
109 } 114 }
110 if flags&RequireIsolatedFile != 0 && c.Isolated == "" { 115 if flags&RequireIsolatedFile != 0 && c.Isolated == "" {
111 return errors.New("-isolated must be specified") 116 return errors.New("-isolated must be specified")
112 } 117 }
113 118
114 return nil 119 return nil
115 } 120 }
OLDNEW
« no previous file with comments | « no previous file | client/cmd/isolated/common.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698