What does below parsing, processing output mean?

I want to understand, what does these mean -

"server_latency": {
    "parsing_ns": 20000,
    "processing_ns": 1224000,
    "encoding_ns": 1074000
}

Does it mean, it can parse 20,000 per second at given resource and can process 1,224,000 query per second and encode 1,074,000 data per second ?

I don’t want to use these data, but I am just curious to know what does It mean!

I believe I have found the information you want.

parsing_ns means “parsing_ nanoseconds”.

In your case it just had not been translated for 2μs

[0.9.0] - 2017-11-14 | Query latency is now returned as numeric (ns) instead of string.

Latency is used to keep track of the latency involved in parsing and processing
the query. It also contains information about the time it took to convert the
result into a format(JSON/Protocol Buffer) that the client expects.
Link to =>-github.com/dgraph-io/dgraph/blob/7851bb75ca753e6fe98ad504dc53cc629ed0573a/query/query.go#L92

"server_latency": {
    "parsing_ns": 2μs,
    "processing_ns": 122μs,
    "encoding_ns": 107μs,
}

example

  "server_latency": {
      "parsing": "101µs",
      "processing": "802ms",
      "json": "115µs",
      "total": "802ms"
    }
  }

In this link you can see an example translated to μs
https://github.com/dgraph-io/dgraph/blob/master/wiki/content/query-language/index.md#debug

More detail about:

https://github.com/dgraph-io/dgraph/blob/master/posting/notes.txt

1 Like

does that mean, it took 1.2 second to process (1,224,000) ?

No, mean that took X nanoseconds to do parsing, processing and encoding.

Ya, I mean it took 1.2 second to parse, process and encode.

That is very very slow for query like this -

{
	answers(func: eq(PostType, "answer")) @filter(uid_in(ParentID, 0x9)) {
		uid
		expand(_all_) {
			uid
			Title
   		    Name
   		    AvatarURL
		}
	}
}

which output 11 posts of answer type and 1 post of question type and 12 associated users for each post in 1.2 second, I mean mysql does much much faster than that.

My Mistake, I just realised, It is dgraph-ratel that takes those time in processing graph, encoding and decoding.

Query in go-client is less.

1 Like