Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: remoting/client/jni/chromoting_jni_instance.cc

Issue 1811833002: Show max latency on client's status bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [Remoting WebApp]Show and upload max capture/encode/render/roundtrip latency Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/client/jni/chromoting_jni_instance.h" 5 #include "remoting/client/jni/chromoting_jni_instance.h"
6 6
7 #include <android/log.h> 7 #include <android/log.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } 477 }
478 478
479 void ChromotingJniInstance::LogPerfStats() { 479 void ChromotingJniInstance::LogPerfStats() {
480 DCHECK(jni_runtime_->network_task_runner()->BelongsToCurrentThread()); 480 DCHECK(jni_runtime_->network_task_runner()->BelongsToCurrentThread());
481 481
482 if (!stats_logging_enabled_) 482 if (!stats_logging_enabled_)
483 return; 483 return;
484 484
485 __android_log_print( 485 __android_log_print(
486 ANDROID_LOG_INFO, "stats", 486 ANDROID_LOG_INFO, "stats",
487 "Bandwidth:%.0f FrameRate:%.1f Capture:%.1f Encode:%.1f " 487 "Bandwidth:%.0f FrameRate:%.1f; "
488 "Decode:%.1f Render:%.1f Latency:%.0f", 488 "(Avg, Max) Capture:%.1f, %lld Encode:%.1f, %lld Decode:%.1f, %lld "
489 "Render:%.1f, %lld RTL:%.0f, %lld",
489 perf_tracker_->video_bandwidth(), perf_tracker_->video_frame_rate(), 490 perf_tracker_->video_bandwidth(), perf_tracker_->video_frame_rate(),
490 perf_tracker_->video_capture_ms(), perf_tracker_->video_encode_ms(), 491 perf_tracker_->video_capture_ms().Average(),
491 perf_tracker_->video_decode_ms(), perf_tracker_->video_paint_ms(), 492 perf_tracker_->video_capture_ms().Max(),
492 perf_tracker_->round_trip_ms()); 493 perf_tracker_->video_encode_ms().Average(),
494 perf_tracker_->video_encode_ms().Max(),
495 perf_tracker_->video_decode_ms().Average(),
496 perf_tracker_->video_decode_ms().Max(),
497 perf_tracker_->video_paint_ms().Average(),
498 perf_tracker_->video_paint_ms().Max(),
499 perf_tracker_->round_trip_ms().Average(),
500 perf_tracker_->round_trip_ms().Max()
501 );
Sergey Ulanov 2016/03/22 00:08:03 nit: move this to the previous line, or run clang-
493 502
494 client_status_logger_->LogStatistics(perf_tracker_.get()); 503 client_status_logger_->LogStatistics(perf_tracker_.get());
495 504
496 jni_runtime_->network_task_runner()->PostDelayedTask( 505 jni_runtime_->network_task_runner()->PostDelayedTask(
497 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), 506 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this),
498 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); 507 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs));
499 } 508 }
500 509
501 } // namespace remoting 510 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/running_samples_unittest.cc ('k') | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698