title: How to measure mongodb index time?
body: <p>we can use </p>
  
  <blockquote>
    <p>db.phones.find({field: 'value'}).explain()</p>
  </blockquote>
  
  <p>to get the 'millis' of query.</p>
  
  <p>but what if i want to know the time(cost) to make index</p>
  
  <p>something like </p>
  
  <blockquote>
    <p>db.phones.ensureIndex({area:1}).explain()</p>
  </blockquote>
  
  <p>can i use mongoshell or another better ways to measure the time of making index?</p>