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

Side by Side Diff: media/cast/test/cast_benchmarks.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 4 years, 12 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
« no previous file with comments | « media/cast/sender/vp8_quantizer_parser_unittest.cc ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 // meshlab by running: 11 // meshlab by running:
12 // $ meshlab benchmarkoutput.asc 12 // $ meshlab benchmarkoutput.asc
13 // After starting meshlab, turn on Render->Show Axis. The red axis will 13 // After starting meshlab, turn on Render->Show Axis. The red axis will
14 // represent bandwidth (in megabits) the blue axis will be packet drop 14 // represent bandwidth (in megabits) the blue axis will be packet drop
15 // (in percent) and the green axis will be latency (in milliseconds). 15 // (in percent) and the green axis will be latency (in milliseconds).
16 // 16 //
17 // This program can also be used for profiling. On linux it has 17 // This program can also be used for profiling. On linux it has
18 // built-in support for this. Simply set the environment variable 18 // built-in support for this. Simply set the environment variable
19 // PROFILE_FILE before running it, like so: 19 // PROFILE_FILE before running it, like so:
20 // $ export PROFILE_FILE=cast_benchmark.profile 20 // $ export PROFILE_FILE=cast_benchmark.profile
21 // Then after running the program, you can view the profile with: 21 // Then after running the program, you can view the profile with:
22 // $ pprof ./out/Release/cast_benchmarks $PROFILE_FILE --gv 22 // $ pprof ./out/Release/cast_benchmarks $PROFILE_FILE --gv
23 23
24 #include <math.h> 24 #include <math.h>
25 #include <stddef.h>
25 #include <stdint.h> 26 #include <stdint.h>
26 27
27 #include <map> 28 #include <map>
28 #include <vector> 29 #include <vector>
29 30
30 #include "base/at_exit.h" 31 #include "base/at_exit.h"
31 #include "base/bind.h" 32 #include "base/bind.h"
32 #include "base/bind_helpers.h" 33 #include "base/bind_helpers.h"
33 #include "base/command_line.h" 34 #include "base/command_line.h"
34 #include "base/debug/profiler.h" 35 #include "base/debug/profiler.h"
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 media::cast::CastBenchmark benchmark; 720 media::cast::CastBenchmark benchmark;
720 if (getenv("PROFILE_FILE")) { 721 if (getenv("PROFILE_FILE")) {
721 std::string profile_file(getenv("PROFILE_FILE")); 722 std::string profile_file(getenv("PROFILE_FILE"));
722 base::debug::StartProfiling(profile_file); 723 base::debug::StartProfiling(profile_file);
723 benchmark.Run(); 724 benchmark.Run();
724 base::debug::StopProfiling(); 725 base::debug::StopProfiling();
725 } else { 726 } else {
726 benchmark.Run(); 727 benchmark.Run();
727 } 728 }
728 } 729 }
OLDNEW
« no previous file with comments | « media/cast/sender/vp8_quantizer_parser_unittest.cc ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698