<commit_before>Welcome (future/)contributors!

## FAQ

**Q: What are the prerequisites to build ResourceD?**

You need Go programming language with version > 1.2.


**Q: How to run tests?**

There are a few ways to run tests:

1. Inside docker container:
    ```bash
    cd $GOPATH/src/github.com/resourced/resourced
    docker build -t resourced . && docker run -t resourced go test ./...
    ```

2. Inside Vagrant VM, docker is also pre-installed inside the VM:
    ```bash
    cd $GOPATH/src/github.com/resourced/resourced
    vagrant up
    vagrant ssh
    cd $GOPATH/src/github.com/resourced/resourced && go test ./...
    ```


**Q: What is the coding style?**

Please use `go fmt` everywhere. If you use SublimeText, feel free to install GoSublime and GoOracle.


**Q: What is the general architecture?**

ResourceD has 3 components: Reader, writer, and HTTP server.

* Reader scrapes information in your server and returns JSON data. Each reader runs in its own goroutine.

* Writer reads the JSON data, process it further, and sends it to other places (e.g. graphite or New Relic). Each writer runs in its own goroutine.

* HTTP server serves the JSON data locally.<commit_msg>Updated instruction on running tests in Vagrant.<commit_after>Welcome (future/)contributors!

## FAQ

**Q: What are the prerequisites to build ResourceD?**

You need Go programming language with version > 1.2.


**Q: How to run tests?**

There are a few ways to run tests:

1. Inside docker container:
    ```bash
    cd $GOPATH/src/github.com/resourced/resourced
    docker build -t resourced . && docker run -t resourced go test ./...
    ```

2. Inside Vagrant VM, docker is also pre-installed inside the VM:
    ```bash
    cd $GOPATH/src/github.com/resourced/resourced
    vagrant up
    vagrant ssh

    # Inside Vagrant
    cd $GOPATH/src/github.com/resourced/resourced
    docker build -t resourced . && docker run -t resourced
    go test ./...
    ```


**Q: What is the coding style?**

Please use `go fmt` everywhere. If you use SublimeText, feel free to install GoSublime and GoOracle.


**Q: What is the general architecture?**

ResourceD has 3 components: Reader, writer, and HTTP server.

* Reader scrapes information in your server and returns JSON data. Each reader runs in its own goroutine.

* Writer reads the JSON data, process it further, and sends it to other places (e.g. graphite or New Relic). Each writer runs in its own goroutine.

* HTTP server serves the JSON data locally.
{'fraction_non_alphanumeric': 0.09273384183059012, 'fraction_numerical': 0.004014452027298274, 'mean_word_length': 3.326388888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7120399', 'n_tokens_mistral': 799, 'n_tokens_neox': 731, 'n_words': 331}