OLD | NEW |
---|---|
(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 def CreateTesterConfig(packet_send_interval_ms, packet_size, execution_time_ms): | |
13 config = network_tester_config_pb2.NetworkTesterConfig() | |
14 config.packet_send_interval_ms = packet_send_interval_ms | |
15 config.packet_size = packet_size | |
16 config.execution_time_ms = execution_time_ms | |
17 return config | |
18 | |
19 network_configs = [] | |
20 | |
21 network_configs.append(CreateTesterConfig(10, 50 , 200)) | |
22 network_configs.append(CreateTesterConfig(10, 100 , 200)) | |
stefan-webrtc
2017/03/30 07:56:53
Remove space after 100: "100 ,"
Same for "50 ,"
michaelt
2017/03/30 08:29:26
Done.
| |
23 | |
24 with open("network_tester_config.dat",'wb') as f: | |
25 for config in network_configs: | |
26 f.write(chr(config.ByteSize())) | |
27 f.write(config.SerializeToString()) | |
OLD | NEW |