Mercurial > hg > orthanc
changeset 7174:2c0758ba1ab6 default tip
Fix uncompressed size in Prometheus metrics
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Tue, 20 Oct 2026 15:40:30 +0200 |
| parents | 745b6573db71 |
| children | |
| files | NEWS OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp |
| diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Tue Oct 20 09:51:09 2026 +0200 +++ b/NEWS Tue Oct 20 15:40:30 2026 +0200 @@ -42,6 +42,8 @@ * Reduced the number of SQL queries when accessing /instances/../tags * Fixed performance regression when a plugin is accessing only the DICOM tags of a file (https://discourse.orthanc-server.org/t/1-13-0-orthancpluginloaddicominstance-reads-the-whole-dicom-file-in-emptypixeldata-and-untilpixeldata-modes/6489) +* Fix uncompressed size in Prometheus metrics + (https://discourse.orthanc-server.org/t/fixing-prometheus-metrics-contribution/6490) * Fix use of the static runtime under Visual Studio (/MT), which broke in 1.12.10 * New CMake options: - "THIRD_PARTY_DOWNLOADS_ROOT_URL" to specify another webserver to downloads the third-parties from.
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Tue Oct 20 09:51:09 2026 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestSystem.cpp Tue Oct 20 15:40:30 2026 +0200 @@ -1032,7 +1032,7 @@ MetricsRegistry& registry = context.GetMetricsRegistry(); registry.SetFloatValue("orthanc_disk_size_mb", static_cast<float>(diskSize) / MEGABYTE); - registry.SetFloatValue("orthanc_uncompressed_size_mb", static_cast<float>(diskSize) / MEGABYTE); + registry.SetFloatValue("orthanc_uncompressed_size_mb", static_cast<float>(uncompressedSize) / MEGABYTE); registry.SetIntegerValue("orthanc_count_patients", static_cast<int64_t>(countPatients)); registry.SetIntegerValue("orthanc_count_studies", static_cast<int64_t>(countStudies)); registry.SetIntegerValue("orthanc_count_series", static_cast<int64_t>(countSeries));
