mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 10:48:26 +00:00
Rename DNS cache efficiency -> utilization because this is more accurate
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -132,7 +132,8 @@ function setMetrics(data, prefix) {
|
|||||||
} else if (prefix === "sysinfo-dns-replies-") {
|
} else if (prefix === "sysinfo-dns-replies-") {
|
||||||
// Compute and display percentage of DNS replies in addition to the absolute value
|
// Compute and display percentage of DNS replies in addition to the absolute value
|
||||||
const lval = val.toLocaleString();
|
const lval = val.toLocaleString();
|
||||||
$("#" + prefix + key).text(lval + " (" + ((100 * val) / data.sum).toFixed(1) + "%)");
|
const percent = (100 * val) / data.sum;
|
||||||
|
$("#" + prefix + key).text(lval + " (" + percent.toFixed(1) + "%)");
|
||||||
} else {
|
} else {
|
||||||
const lval = val.toLocaleString();
|
const lval = val.toLocaleString();
|
||||||
$("#" + prefix + key).text(lval);
|
$("#" + prefix + key).text(lval);
|
||||||
@@ -161,7 +162,7 @@ function updateMetrics() {
|
|||||||
// Set metrics
|
// Set metrics
|
||||||
setMetrics(metrics, "sysinfo-");
|
setMetrics(metrics, "sysinfo-");
|
||||||
|
|
||||||
$("#cache-efficiency").text(((100 * cacheEntries) / cacheSize).toFixed(2) + "%");
|
$("#cache-utilization").text(((100 * cacheEntries) / cacheSize).toFixed(1) + "%");
|
||||||
|
|
||||||
$("div[id^='sysinfo-metrics-overlay']").hide();
|
$("div[id^='sysinfo-metrics-overlay']").hide();
|
||||||
// Update every 10 seconds
|
// Update every 10 seconds
|
||||||
|
|||||||
@@ -170,37 +170,37 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<span title="Size of the DNS domain cache">DNS cache size:</span>
|
<span title="Total size of the DNS cache">DNS cache size:</span>
|
||||||
</th>
|
</th>
|
||||||
<td id="sysinfo-dns-cache-size"> </td>
|
<td id="sysinfo-dns-cache-size"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<span title="Percentage of the allocated cache that is currently in use. If this value is very low, it is advisable to reduce the DNS cache size to optimize performance">DNS cache efficiency:</span>
|
<span title="Percentage of the allocated cache that is currently in use. If this value is very low, it is advisable to reduce the DNS cache size to optimize performance">DNS cache utilization:</span>
|
||||||
</th>
|
</th>
|
||||||
<td id="cache-efficiency"> </td>
|
<td id="cache-utilization"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<span title="Number of cache insertions">DNS cache insertions:</span>
|
<span title="Number of cache insertions, this number will grow continuously as expiring records naturally make space for new records">DNS cache insertions:</span>
|
||||||
</th>
|
</th>
|
||||||
<td id="sysinfo-dns-cache-inserted"> </td>
|
<td id="sysinfo-dns-cache-inserted"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<span title="Number of cache entries that had to be removed although they are not expired (increase cache size to reduce this number)" lookatme-text="DNS cache evictions:">DNS cache evictions:</span>
|
<span title="Number of cache entries that had to be removed although they are not expired. When this number if larger than zero, you should consider increasing your total cache size" lookatme-text="DNS cache evictions:">DNS cache evictions:</span>
|
||||||
</th>
|
</th>
|
||||||
<td id="sysinfo-dns-cache-evicted"> </td>
|
<td id="sysinfo-dns-cache-evicted"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
DNS cache expiries:
|
<span title="Number of cache entries that were removed because they expired">DNS cache expiries:</span>
|
||||||
</th>
|
</th>
|
||||||
<td id="sysinfo-dns-cache-expired"> </td>
|
<td id="sysinfo-dns-cache-expired"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
Immortal DNS cache entries:
|
<span title="Number of immortan cache entries that will never expire (e.g. from /etc/hosts or local configuration)">Immortal DNS cache entries:</span>
|
||||||
</th>
|
</th>
|
||||||
<td id="sysinfo-dns-cache-immortal"> </td>
|
<td id="sysinfo-dns-cache-immortal"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user