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

Merge branch 'dmuts' of github.com:dgraph-io/dgraph into dmuts

parents 2cae836f f8a11bda
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,8 @@ func run(l *lex.Lexer) {
}
func Parse(input string) (gq *GraphQuery, mu *Mutation, rerr error) {
l := lex.NewLexer(input)
l := &lex.Lexer{}
l.Init(input)
go run(l)
mu = nil
......
......@@ -34,7 +34,8 @@ func TestNewLexer(t *testing.T) {
}
}
}`
l := lex.NewLexer(input)
l := &lex.Lexer{}
l.Init(input)
go run(l)
for item := range l.Items {
if item.Typ == lex.ItemError {
......@@ -61,7 +62,8 @@ func TestNewLexerMutation(t *testing.T) {
_city
}
}`
l := lex.NewLexer(input)
l := &lex.Lexer{}
l.Init(input)
go run(l)
for item := range l.Items {
if item.Typ == lex.ItemError {
......@@ -79,7 +81,8 @@ func TestAbruptMutation(t *testing.T) {
Why is this #!!?
How is this?
}`
l := lex.NewLexer(input)
l := &lex.Lexer{}
l.Init(input)
go run(l)
var typ lex.ItemType
for item := range l.Items {
......
......@@ -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