.. _testing_local_stats: Local Stats =========== The `local-stats` `branch `_ allows a developer to run a local statsd server, and see stats emissions from a client running in the simulator/emulator. Unless network tunneling is set up this is not going to work in a physical device, as the statsd server is running on the computer's local network. ------ Config ------ The `config template `_ has already been updated to use a local statsd server. However, if you are using Android to test, the `static address `_ used for the server should be changed to ``10.0.2.2`` per the `Set up Android Emulator networking `_ docs. ----- Steps ----- 1. Build the desired dist target following the build docs :ref:`here `. 2. Start statsd locally. You can do this by cloning `statsd `_ and running from within the root of the repo with:: node stats.js config.js An example ``config.js`` file. Note that the port must match the port in the `config_template `_:: { port: 8125 , backends: [ "./backends/console" ] , servers: [{server: "./servers/tcp", debug: true}] , debug: true } 3. Run the :ref:`example ` app. 4. Stats should appear in the terminal window you are running ``statsd`` in.