MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / getTimeStat

Method getTimeStat

src/stats/QueryStats.java:883–891  ·  view source on GitHub ↗

@return a timed stat for the overall query or NaN if the stat didn't exist

(final QueryStat stat)

Source from the content-addressed store, hash-verified

881
882 /** @return a timed stat for the overall query or NaN if the stat didn't exist */
883 public double getTimeStat(final QueryStat stat) {
884 if (!stat.is_time) {
885 throw new IllegalArgumentException("The stat is not a time stat");
886 }
887 if (!overall_stats.containsKey(stat)) {
888 return Double.NaN;
889 }
890 return DateTime.msFromNano(overall_stats.get(stat));
891 }
892
893 /** @param enable_dupes whether or not to allow duplicate queries to run */
894 public static void setEnableDuplicates(final boolean enable_dupes) {

Callers 1

getStatTimeMethod · 0.95

Calls 2

msFromNanoMethod · 0.95
getMethod · 0.45

Tested by 1

getStatTimeMethod · 0.76