<commit_before>// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <cstring>
#include <vector>

#include "ppapi/cpp/module.h"
#include "ppapi/cpp/private/net_address_private.h"
#include "ppapi/cpp/private/tcp_socket_private.h"
#include "ppapi/cpp/var.h"
#include "ppapi/tests/test_udp_socket_private.h"
#include "ppapi/tests/test_utils.h"
#include "ppapi/tests/testing_instance.h"

REGISTER_TEST_CASE(UDPSocketPrivate);

namespace {

const uint16_t kPortScanFrom = 1024;
const uint16_t kPortScanTo = 4096;

const size_t kEnglishAlphabetSize = 'z' - 'a' + 1;

// 4K datagrams for sendto/recvfrom benchmarks.
const size_t kBenchmarkMessageSize = 1u << 12;

// Maximum number of datagrams for sendto/recvfrom benchmarks.
const size_t kBenchmarkMaxNumMessages = 1u << 12;

// Assuming that system buffer size for UDP sockets is at least 32K.
const size_t kUDPBufferSize = 32768;

}  // namespace

TestUDPSocketPrivate::TestUDPSocketPrivate(
    TestingInstance* instance)
    : TestCase(instance) {
}

bool TestUDPSocketPrivate::Init() {<commit_msg>Fixed message size and number of iterations.<commit_after>// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <cstring>
#include <vector>

#include "ppapi/cpp/module.h"
#include "ppapi/cpp/private/net_address_private.h"
#include "ppapi/cpp/private/tcp_socket_private.h"
#include "ppapi/cpp/var.h"
#include "ppapi/tests/test_udp_socket_private.h"
#include "ppapi/tests/test_utils.h"
#include "ppapi/tests/testing_instance.h"

REGISTER_TEST_CASE(UDPSocketPrivate);

namespace {

const uint16_t kPortScanFrom = 1024;
const uint16_t kPortScanTo = 4096;

const size_t kEnglishAlphabetSize = 'z' - 'a' + 1;

// 1K datagrams for sendto/recvfrom benchmarks.
const size_t kBenchmarkMessageSize = 1u << 10;

// Maximum number of datagrams for sendto/recvfrom benchmarks.
const size_t kBenchmarkMaxNumMessages = 1u << 10;

// Assuming that system buffer size for UDP sockets is at least 32K.
const size_t kUDPBufferSize = 32768;

}  // namespace

TestUDPSocketPrivate::TestUDPSocketPrivate(
    TestingInstance* instance)
    : TestCase(instance) {
}

bool TestUDPSocketPrivate::Init() {
{'fraction_non_alphanumeric': 0.10147368421052631, 'fraction_numerical': 0.026105263157894736, 'mean_word_length': 4.91044776119403, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5380787', 'n_tokens_mistral': 868, 'n_tokens_neox': 796, 'n_words': 222}