<commit_before>// Copyright 2016 Apcera Inc. All rights reserved.

package server

import (
	"errors"
	"fmt"
	"net"
	"net/url"
	"sort"
	"strings"
	"sync"
	"sync/atomic"
	"time"

	"github.com/nats-io/gnatsd/auth"
	"github.com/nats-io/gnatsd/server"
	"github.com/nats-io/go-nats-streaming/pb"
	"github.com/nats-io/nats"
	"github.com/nats-io/nats-streaming-server/spb"
	"github.com/nats-io/nuid"

	natsd "github.com/nats-io/gnatsd/test"

	stores "github.com/nats-io/nats-streaming-server/stores"

	"regexp"
)

// A single STAN server

// Server defaults.
const (
	// VERSION is the current version for the NATS Streaming server.
	VERSION = "0.0.1.alpha"

	DefaultClusterID      = "test-cluster"
	DefaultDiscoverPrefix = "_STAN.discover"
	DefaultPubPrefix      = "_STAN.pub"
	DefaultSubPrefix      = "_STAN.sub"
	DefaultUnSubPrefix    = "_STAN.unsub"
	DefaultClosePrefix    = "_STAN.close"
	DefaultStoreType      = stores.TypeMemory

	// DefaultChannelLimit defines how many channels (literal subjects) we allow
	DefaultChannelLimit = 100
	// DefaultSubStoreLimit defines how many subscriptions per channel we allow
	DefaultSubStoreLimit = 1000
	// DefaultMsgStoreLimit defines how many messages per channel we allow
	DefaultMsgStoreLimit = 1000000
	// DefaultMsgSizeStoreLimit defines how many bytes per channel we allow
	DefaultMsgSizeStoreLimit = DefaultMsgStoreLimit * 1024

	// Heartbeat intervals.
	DefaultHeartBeatInterval   = 30 * time.Second
	DefaultClientHBTimeout     = 10 * time.Second
	DefaultMaxFailedHeartBeats = int((5 * time.Minute) / DefaultHeartBeatInterval)

	// Max number of outstanding go-routines handling connect requests for
	// duplicate client IDs.
	defaultMaxDupCIDRoutines = 100
	// Timeout used to ping the known client when processing a connection
	// request for a duplicate client ID.
	defaultCheckDupCIDTimeout = 500 * time.Millisecond
<commit_msg>bump version to 0.1.0 for MVP release<commit_after>// Copyright 2016 Apcera Inc. All rights reserved.

package server

import (
	"errors"
	"fmt"
	"net"
	"net/url"
	"sort"
	"strings"
	"sync"
	"sync/atomic"
	"time"

	"github.com/nats-io/gnatsd/auth"
	"github.com/nats-io/gnatsd/server"
	"github.com/nats-io/go-nats-streaming/pb"
	"github.com/nats-io/nats"
	"github.com/nats-io/nats-streaming-server/spb"
	"github.com/nats-io/nuid"

	natsd "github.com/nats-io/gnatsd/test"

	stores "github.com/nats-io/nats-streaming-server/stores"

	"regexp"
)

// A single STAN server

// Server defaults.
const (
	// VERSION is the current version for the NATS Streaming server.
	VERSION = "0.1.0"

	DefaultClusterID      = "test-cluster"
	DefaultDiscoverPrefix = "_STAN.discover"
	DefaultPubPrefix      = "_STAN.pub"
	DefaultSubPrefix      = "_STAN.sub"
	DefaultUnSubPrefix    = "_STAN.unsub"
	DefaultClosePrefix    = "_STAN.close"
	DefaultStoreType      = stores.TypeMemory

	// DefaultChannelLimit defines how many channels (literal subjects) we allow
	DefaultChannelLimit = 100
	// DefaultSubStoreLimit defines how many subscriptions per channel we allow
	DefaultSubStoreLimit = 1000
	// DefaultMsgStoreLimit defines how many messages per channel we allow
	DefaultMsgStoreLimit = 1000000
	// DefaultMsgSizeStoreLimit defines how many bytes per channel we allow
	DefaultMsgSizeStoreLimit = DefaultMsgStoreLimit * 1024

	// Heartbeat intervals.
	DefaultHeartBeatInterval   = 30 * time.Second
	DefaultClientHBTimeout     = 10 * time.Second
	DefaultMaxFailedHeartBeats = int((5 * time.Minute) / DefaultHeartBeatInterval)

	// Max number of outstanding go-routines handling connect requests for
	// duplicate client IDs.
	defaultMaxDupCIDRoutines = 100
	// Timeout used to ping the known client when processing a connection
	// request for a duplicate client ID.
	defaultCheckDupCIDTimeout = 500 * time.Millisecond

{'fraction_non_alphanumeric': 0.09507415254237288, 'fraction_numerical': 0.01986228813559322, 'mean_word_length': 3.956692913385827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3551381', 'n_tokens_mistral': 1338, 'n_tokens_neox': 1237, 'n_words': 316}