Calculating the avg time between two time stamps

2014-07-24 Thread John Smith
Using ES 1.2.2 The below aggregation will give me my average requests per second and the average response times for each second. Is this the only way to do it or is there better way? Since scripting is a bit slow? aggs: { tps: { date_histogram: { field:

Re: Calculating the avg time between two time stamps

2014-07-24 Thread David Pilato
The best option could be to compute that at index time. On a client level or by using the new transform feature: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-transform.html#mapping-transform HTH -- David ;-) Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Re: Calculating the avg time between two time stamps

2014-07-24 Thread John Smith
Cool! So for the new feature... All I need is an empty field called avgRespTime and in my mapping define a transform for this field which compute the time difference between thw two stamp times? -- You received this message because you are subscribed to the Google Groups elasticsearch group.