Returns the base path to use for the Gnuplot files.
(final TSDB tsdb, final HttpQuery query)
| 424 | |
| 425 | /** Returns the base path to use for the Gnuplot files. */ |
| 426 | private String getGnuplotBasePath(final TSDB tsdb, final HttpQuery query) { |
| 427 | final Map<String, List<String>> q = query.getQueryString(); |
| 428 | q.remove("ignore"); |
| 429 | // Super cheap caching mechanism: hash the query string. |
| 430 | final HashMap<String, List<String>> qs = |
| 431 | new HashMap<String, List<String>>(q); |
| 432 | // But first remove the parameters that don't influence the output. |
| 433 | qs.remove("png"); |
| 434 | qs.remove("json"); |
| 435 | qs.remove("ascii"); |
| 436 | return tsdb.getConfig().getDirectoryName("tsd.http.cachedir") + |
| 437 | Integer.toHexString(qs.hashCode()); |
| 438 | } |
| 439 | |
| 440 | /** |
| 441 | * Checks whether or not it's possible to re-serve this query from disk. |
no test coverage detected