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

Side by Side Diff: webrtc/tools/network_tester/create_network_tester_config.py

Issue 2808203003: Reland "Add first part of the network_tester functionality" (Closed)
Patch Set: use ACCESS_ON instead of GUARDED_BY Created 3 years, 8 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
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 #
4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree.
9
10 import network_tester_config_pb2
11
12
13 def AddConfig(all_configs,
14 packet_send_interval_ms,
15 packet_size,
16 execution_time_ms):
17 config = all_configs.configs.add()
18 config.packet_send_interval_ms = packet_send_interval_ms
19 config.packet_size = packet_size
20 config.execution_time_ms = execution_time_ms
21
22 def main():
23 all_configs = network_tester_config_pb2.NetworkTesterAllConfigs()
24 AddConfig(all_configs, 10, 50, 200)
25 AddConfig(all_configs, 10, 100, 200)
26 with open("network_tester_config.dat", 'wb') as f:
27 f.write(all_configs.SerializeToString())
28
29 if __name__ == "__main__":
30 main()
OLDNEW
« no previous file with comments | « webrtc/tools/network_tester/config_reader.cc ('k') | webrtc/tools/network_tester/network_tester_config.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698