<commit_before>package croc

import (
	"crypto/rand"
	"fmt"
	"io/ioutil"
	"os"
	"sync"
	"testing"
	"time"

	"github.com/schollz/croc/src/utils"
	"github.com/stretchr/testify/assert"
)

func sendAndReceive(t *testing.T, forceSend int, local bool) {
	var startTime time.Time
	var durationPerMegabyte float64
	megabytes := 10
	if local {
		megabytes = 100
	}
	fname := generateRandomFile(megabytes)
	var wg sync.WaitGroup
	wg.Add(2)
	go func() {
		defer wg.Done()
		c := Init(true)
		c.NoLocal = !local
		c.ForceSend = forceSend
		c.UseEncryption = false
		c.UseEncryption = false
		assert.Nil(t, c.Send(fname, "test"))
	}()
	go func() {
		defer wg.Done()
		time.Sleep(3 * time.Second)
		os.MkdirAll("test", 0755)
		os.Chdir("test")
		c := Init(true)
		c.NoLocal = !local
		c.ForceSend = forceSend<commit_msg>disable compression/enc<commit_after>package croc

import (
	"crypto/rand"
	"fmt"
	"io/ioutil"
	"os"
	"sync"
	"testing"
	"time"

	"github.com/schollz/croc/src/utils"
	"github.com/stretchr/testify/assert"
)

func sendAndReceive(t *testing.T, forceSend int, local bool) {
	var startTime time.Time
	var durationPerMegabyte float64
	megabytes := 10
	if local {
		megabytes = 100
	}
	fname := generateRandomFile(megabytes)
	var wg sync.WaitGroup
	wg.Add(2)
	go func() {
		defer wg.Done()
		c := Init(true)
		c.NoLocal = !local
		c.ForceSend = forceSend
		c.UseCompression = false
		c.UseEncryption = false
		assert.Nil(t, c.Send(fname, "test"))
	}()
	go func() {
		defer wg.Done()
		time.Sleep(3 * time.Second)
		os.MkdirAll("test", 0755)
		os.Chdir("test")
		c := Init(true)
		c.NoLocal = !local
		c.ForceSend = forceSend
{'fraction_non_alphanumeric': 0.14602587800369685, 'fraction_numerical': 0.016019716574245224, 'mean_word_length': 3.7346938775510203, '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': '3061124', 'n_tokens_mistral': 742, 'n_tokens_neox': 681, 'n_words': 138}