<commit_before>package main

import (
	"flag"
	"fmt"
	"log"
	"os"
)

func main() {
	var vapeFile = flag.String("config", "Vapefile", "The full path to the Vape configuration file")
	flag.Parse()

	args := flag.Args()
	if len(args) < 1 {
		fmt.Println("vape: usage: no base URL specified")
		os.Exit(0)
	}

	baseURL, err := parseBaseURL(args[0])
	if err != nil {
		fmt.Printf("vape: invalid base URL: %v\n", err)
		os.Exit(0)
	}

	smokeTests, err := parseVapefile(*vapeFile)
	if err != nil {
		log.Fatal(err)
	}

	testsLen := len(smokeTests)
	resCh, errCh := make(chan SmokeTestResult, testsLen), make(chan error, testsLen)
	vape := NewVape(DefaultClient, baseURL, resCh, errCh)
	vape.Process(smokeTests)

	for i := 0; i < testsLen; i++ {
		select {
		case res := <-resCh:
			fmt.Println(formatResult(res))
		case err := <-errCh:
			fmt.Println(err)
		}
	}
}<commit_msg>Print timing and result info (#16)<commit_after>package main

import (
	"flag"
	"fmt"
	"log"
	"os"
	"time"
)

var vapeFile = flag.String("config", "Vapefile", "The full path to the Vape configuration file")

func main() {
	start := time.Now()

	flag.Parse()

	args := flag.Args()
	if len(args) < 1 {
		fmt.Println("vape: usage: no base URL specified")
		os.Exit(0)
	}

	baseURL, err := parseBaseURL(args[0])
	if err != nil {
		fmt.Printf("vape: invalid base URL: %v\n", err)
		os.Exit(0)
	}

	smokeTests, err := parseVapefile(*vapeFile)
	if err != nil {
		log.Fatal(err)
	}

	testsLen := len(smokeTests)
	resCh, errCh := make(chan SmokeTestResult, testsLen), make(chan error, testsLen)
	vape := NewVape(DefaultClient, baseURL, resCh, errCh)
	vape.Process(smokeTests)

	passedCount := 0

	for i := 0; i < testsLen; i++ {
		select {
		case res := <-resCh:
			if res.Passed() {
				passedCount++
			}

			fmt.Println(formatResult(res))
		case err := <-errCh:
			fmt.Println(err)
		}
	}

	if passedCount < testsLen {
		fmt.Println("\n🔥  Some tests failed. you may have a bad deployment")
		os.Exit(2)
	}

	fmt.Printf("\n✨  [%d/%d] tests passed in %s\n", passedCount, testsLen, time.Since(start))

}
{'fraction_non_alphanumeric': 0.16335433834222007, 'fraction_numerical': 0.0067862336403296175, 'mean_word_length': 3.701594533029613, 'pattern_counts': {'":': 0, '<': 12, '<?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': '5137616', 'n_tokens_mistral': 884, 'n_tokens_neox': 819, 'n_words': 206}