<p>You can easily measure the time your request takes using JS.</p>

<p>See this Stack Overflow question for example code: <a href="https://stackoverflow.com/questions/3498503/find-out-how-long-an-ajax-request-took-to-complete">https://stackoverflow.com/questions/3498503/find-out-how-long-an-ajax-request-took-to-complete</a></p>



<blockquote>
<pre class="lang-js prettyprint-override"><code>var start_time = new Date().getTime();

jQuery.get('your-url', data, 
    function(data, status, xhr) {
        var request_time = new Date().getTime() - start_time;
    }
);
</code></pre>
</blockquote>

CC BY-SA 3.0
2016-10-01T05:27:08.647Z
Thanks, I expected there be (globals) variables which could do this out-of-the-box?
Nutmeg
CC BY-SA 3.0
2016-09-30T09:35:06.017Z
2016-09-30T09:35:06.017Z
2017-05-23T12:38:53.957Z
carlcs
<p>Is it possible to render the search time after a query (out-of-the-box)?</p>

<p>eg: 2 results(.0271 seconds)</p>

<p>There are a number of plugins available but I would like to find out what's possible within Craft's core.</p>

<search>
Time to search query
# Time to search query

(Asked by: username_0 on 2016-09-30)

Is it possible to render the search time after a query (out-of-the-box)?

eg: 2 results(.0271 seconds)

There are a number of plugins available but I would like to find out what's possible within Craft's core.

**Tags:** search


---

## 1 answers

### Answer by username_1 on 2016-09-30. Score: 2

You can easily measure the time your request takes using JS.
See this Stack Overflow question for example code: https://stackoverflow.com/questions/3498503/find-out-how-long-an-ajax-request-took-to-complete

var start_time = new Date().getTime();

jQuery.get('your-url', data, 
    function(data, status, xhr) {
        var request_time = new Date().getTime() - start_time;
    }
);

> **Comments:**
> **username_0**: Thanks, I expected there be (globals) variables which could do this out-of-the-box?  

---

