mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +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-") {
|
||||
// Compute and display percentage of DNS replies in addition to the absolute value
|
||||
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 {
|
||||
const lval = val.toLocaleString();
|
||||
$("#" + prefix + key).text(lval);
|
||||
@@ -161,7 +162,7 @@ function updateMetrics() {
|
||||
// Set metrics
|
||||
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();
|
||||
// Update every 10 seconds
|
||||
|
||||
@@ -170,37 +170,37 @@ mg.include('scripts/pi-hole/lua/header_authenticated.lp','r')
|
||||
<tbody>
|
||||
<tr>
|
||||
<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>
|
||||
<td id="sysinfo-dns-cache-size"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
<td id="cache-efficiency"> </td>
|
||||
<td id="cache-utilization"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
<td id="sysinfo-dns-cache-inserted"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
<td id="sysinfo-dns-cache-evicted"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
DNS cache expiries:
|
||||
<span title="Number of cache entries that were removed because they expired">DNS cache expiries:</span>
|
||||
</th>
|
||||
<td id="sysinfo-dns-cache-expired"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
<td id="sysinfo-dns-cache-immortal"> </td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user