OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This program benchmarks the theoretical throughput of the cast library. | 5 // This program benchmarks the theoretical throughput of the cast library. |
6 // It runs using a fake clock, simulated network and fake codecs. This allows | 6 // It runs using a fake clock, simulated network and fake codecs. This allows |
7 // tests to run much faster than real time. | 7 // tests to run much faster than real time. |
8 // To run the program, run: | 8 // To run the program, run: |
9 // $ ./out/Release/cast_benchmarks | tee benchmarkoutput.asc | 9 // $ ./out/Release/cast_benchmarks | tee benchmarkoutput.asc |
10 // This may take a while, when it is done, you can view the data with | 10 // This may take a while, when it is done, you can view the data with |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 cast_receiver_ = CastReceiver::Create(cast_environment_receiver_, | 295 cast_receiver_ = CastReceiver::Create(cast_environment_receiver_, |
296 audio_receiver_config_, | 296 audio_receiver_config_, |
297 video_receiver_config_, | 297 video_receiver_config_, |
298 &receiver_to_sender_); | 298 &receiver_to_sender_); |
299 net::IPEndPoint dummy_endpoint; | 299 net::IPEndPoint dummy_endpoint; |
300 transport_sender_.Init( | 300 transport_sender_.Init( |
301 new CastTransportSenderImpl( | 301 new CastTransportSenderImpl( |
302 NULL, | 302 NULL, |
303 testing_clock_sender_, | 303 testing_clock_sender_, |
304 dummy_endpoint, | 304 dummy_endpoint, |
| 305 make_scoped_ptr(new base::DictionaryValue), |
305 base::Bind(&UpdateCastTransportStatus), | 306 base::Bind(&UpdateCastTransportStatus), |
306 base::Bind(&IgnoreRawEvents), | 307 base::Bind(&IgnoreRawEvents), |
307 base::TimeDelta::FromSeconds(1), | 308 base::TimeDelta::FromSeconds(1), |
308 task_runner_sender_, | 309 task_runner_sender_, |
309 &sender_to_receiver_), | 310 &sender_to_receiver_), |
310 &video_bytes_encoded_, | 311 &video_bytes_encoded_, |
311 &audio_bytes_encoded_); | 312 &audio_bytes_encoded_); |
312 | 313 |
313 cast_sender_ = | 314 cast_sender_ = |
314 CastSender::Create(cast_environment_sender_, &transport_sender_); | 315 CastSender::Create(cast_environment_sender_, &transport_sender_); |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 media::cast::CastBenchmark benchmark; | 709 media::cast::CastBenchmark benchmark; |
709 if (getenv("PROFILE_FILE")) { | 710 if (getenv("PROFILE_FILE")) { |
710 std::string profile_file(getenv("PROFILE_FILE")); | 711 std::string profile_file(getenv("PROFILE_FILE")); |
711 base::debug::StartProfiling(profile_file); | 712 base::debug::StartProfiling(profile_file); |
712 benchmark.Run(); | 713 benchmark.Run(); |
713 base::debug::StopProfiling(); | 714 base::debug::StopProfiling(); |
714 } else { | 715 } else { |
715 benchmark.Run(); | 716 benchmark.Run(); |
716 } | 717 } |
717 } | 718 } |
OLD | NEW |