samvera / questioning_authority

Question your authorities
Other
54 stars 30 forks source link

add option to include performance statistics in the returned result #236

Closed elrayle closed 5 years ago

elrayle commented 5 years ago

Add ”performance” and ”results” keys to full output of SearchQuery #search and FindTerm #find, which include the new performance stats and the original set of results, respectively.

For search...

{
  "performance":
  {
    "result_count":6,
    "fetch_time_s":0.148102,
    "normalization_time_s":5.0e-06,
    "total_time_s":0.14810700000000002
  }
  results”:{ _same_as_before_}
}

For term fetch...

{
  "performance":
  {
    "predicate_count":6,
    "fetch_time_s":0.148102,
    "normalization_time_s":5.0e-06,
    "total_time_s":0.14810700000000002
  }
  results”:{ _same_as_before_}
}