Skip to content
Snippets Groups Projects
Commit f8a11bda authored by Manish R Jain's avatar Manish R Jain
Browse files

Change flag names, and switch from Error log to debug log

parent 04d32e47
No related branches found
No related tags found
No related merge requests found
......@@ -165,7 +165,7 @@ func (s *state) getUidForString(str string) error {
if err == posting.E_TMP_ERROR {
time.Sleep(time.Microsecond)
glog.WithError(err).WithField("nq.Subject", str).
Error("Temporary error")
Debug("Temporary error")
} else {
glog.WithError(err).WithField("nq.Subject", str).
Error("While getting UID")
......
......@@ -41,8 +41,9 @@ var instanceIdx = flag.Uint64("instanceIdx", 0,
var numInstances = flag.Uint64("numInstances", 1,
"Total number of instances among which uid assigning is shared")
var postingDir = flag.String("postings", "", "Directory to store posting lists")
var uidDir = flag.String("uidDir", "", "Directory to read UID posting lists")
var uidDir = flag.String("uids", "", "Directory to read UID posting lists")
var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file")
var memprofile = flag.String("memprofile", "", "write memory profile to file")
var numcpu = flag.Int("numCpu", runtime.NumCPU(),
"Number of cores to be used by the process")
......@@ -108,4 +109,13 @@ func main() {
}
glog.Info("Calling merge lists")
posting.MergeLists(100 * numCpus) // 100 per core.
if len(*memprofile) > 0 {
f, err := os.Create(*memprofile)
if err != nil {
glog.Fatal(err)
}
pprof.WriteHeapProfile(f)
f.Close()
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment