<commit_before>## AppPerf (Application Performance Monitoring)

[![Build Status](https://travis-ci.org/randy-girard/app_perf.svg?branch=master)](https://travis-ci.org/randy-girard/app_perf)

### Demo

There is an instance of this running at https://app-perf.herokuapp.com. Please note that there is a low data retention setting so that it doesn't go over the allowed total row count with Heroku.

To log in use the email address of "<EMAIL>" and a password of "password".

![Overview](/doc/overview.png?raw=true "Overview")



<b>NOTE: This application is in extremely beginning stages and I am still working out flows and learning the data model. I will be cleaning code up as I go.</b>

This is a application monitoring app. I am trying to build an open source, easy to setup, performance monitoring tool.


### Setup

Setup should be striaghtforward and easy. We use foreman to manage processes. Begin by running the setup script:

```
./bin/setup
```

This should create and setup the database and any other needed services/apps. Then to start everything up, run foreman:

```
bundle exec foreman start
```

Navigate to http://localhost:5000. This application is setup to report to itself so you can begin seeing information immediatetly!

### Using Other databases

SQLite has some limitation with concurrency in this app, as well as various date functions used for reporting. If you would rather test against postgresql (Mysql to come), you can run the following command to create a local development database running on port 5443 (Must have postgresql installed):
```
./bin/setup_psql
```

**Note: Don't forget to update your `config/datbase.yml` file.**

## Adding Applications

App Perf will automatically detect new applications that are posting data and display them in the Applications page. From there you can go to each individual application to view the performance metrics.

In order to monitor an application, you have to add the Ruby Agent gem to the Gemfile:

```
gem "app_perf_rpm", :git => "<EMAIL>:randy-girard/app_perf_rpm"
```

Once you have add the gem, Add the following lines to your project (or in an initializer):

```
require 'app_perf_rpm'

AppPerfRpm.configure do |rpm|
  rpm.license_key = "License Key"
  rpm.application_name = "Application Name"<commit_msg>Fix typo<commit_after>## AppPerf (Application Performance Monitoring)

[![Build Status](https://travis-ci.org/randy-girard/app_perf.svg?branch=master)](https://travis-ci.org/randy-girard/app_perf)

### Demo

There is an instance of this running at https://app-perf.herokuapp.com. Please note that there is a low data retention setting so that it doesn't go over the allowed total row count with Heroku.

To log in use the email address of "<EMAIL>" and a password of "password".

![Overview](/doc/overview.png?raw=true "Overview")



<b>NOTE: This application is in extremely beginning stages and I am still working out flows and learning the data model. I will be cleaning code up as I go.</b>

This is a application monitoring app. I am trying to build an open source, easy to setup, performance monitoring tool.


### Setup

Setup should be striaghtforward and easy. We use foreman to manage processes. Begin by running the setup script:

```
./bin/setup
```

This should create and setup the database and any other needed services/apps. Then to start everything up, run foreman:

```
bundle exec foreman start
```

Navigate to http://localhost:5000. This application is setup to report to itself so you can begin seeing information immediatetly!

### Using Other databases

SQLite has some limitation with concurrency in this app, as well as various date functions used for reporting. If you would rather test against postgresql (Mysql to come), you can run the following command to create a local development database running on port 5443 (Must have postgresql installed):
```
./bin/setup_psql
```

**Note: Don't forget to update your `config/database.yml` file.**

## Adding Applications

App Perf will automatically detect new applications that are posting data and display them in the Applications page. From there you can go to each individual application to view the performance metrics.

In order to monitor an application, you have to add the Ruby Agent gem to the Gemfile:

```
gem "app_perf_rpm", :git => "<EMAIL>:randy-girard/app_perf_rpm"
```

Once you have add the gem, Add the following lines to your project (or in an initializer):

```
require 'app_perf_rpm'

AppPerfRpm.configure do |rpm|
  rpm.license_key = "License Key"
  rpm.application_name = "Application Name"
{'fraction_non_alphanumeric': 0.08082131935342944, 'fraction_numerical': 0.0034949759720401923, 'mean_word_length': 4.5841463414634145, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 6, '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': '4563982', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1223, 'n_words': 618}