diff --git a/common/rfb/benchmark.cxx b/common/rfb/benchmark.cxx index 32aa659..eb5c780 100644 --- a/common/rfb/benchmark.cxx +++ b/common/rfb/benchmark.cxx @@ -242,6 +242,8 @@ void benchmark(const std::string &path, const std::string &results_file) { totals[run] = total; stats[run] = connection.getStats(); + vlog.info("JPEG stats: %u ms", stats[run].jpeg_stats.ms); + vlog.info("WebP stats: %u ms", stats[run].webp_stats.ms); vlog.info("RUN %d. Bytes sent %lu..", run, stats[run].bytes); } diff --git a/common/rfb/benchmark.h b/common/rfb/benchmark.h index 0cb1558..c834dfd 100644 --- a/common/rfb/benchmark.h +++ b/common/rfb/benchmark.h @@ -1,4 +1,6 @@ -/* Copyright (C) 2025 Kasm Technologies Corp +/* Copyright 2015 Pierre Ossman for Cendio AB + * Copyright (C) 2015 D. R. Commander. All Rights Reserved. + * Copyright (C) 2025 Kasm Technologies Corp * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,10 +33,6 @@ #include "SMsgWriter.h" #include "ffmpeg.h" -namespace rdr { - class FileInStream; -} - static rfb::LogWriter vlog("Benchmarking"); namespace rfb { @@ -100,9 +98,7 @@ namespace rfb { ~MockSConnection() override = default; void writeUpdate(const UpdateInfo &ui, const PixelBuffer *pb) { - //manager.pruneLosslessRefresh(Region(pb->getRect())); - - cache.clear(); + cache.clear(); manager.clearEncodingTime(); if (!ui.is_empty()) { @@ -191,7 +187,6 @@ namespace rfb { ~MockCConnection() override = default; - struct stats_t { EncodeManager::codecstats_t jpeg_stats; EncodeManager::codecstats_t webp_stats; @@ -240,8 +235,6 @@ namespace rfb { } void framebufferUpdateStart() override { - CConnection::framebufferUpdateStart(); - updates.clear(); } @@ -249,7 +242,6 @@ namespace rfb { const PixelBuffer *pb = getFramebuffer(); UpdateInfo ui; - const Region clip(pb->getRect()); updates.add_changed(pb->getRect()); @@ -259,10 +251,6 @@ namespace rfb { } void dataRect(const Rect &r, int encoding) override { - CConnection::dataRect(r, encoding); - - if (encoding != encodingCopyRect) // FIXME - updates.add_changed(Region(r)); } void setColourMapEntries(int, int, rdr::U16 *) override {