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 |
| 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() |
OLD | NEW |