<commit_before>## Usage ##

Using the [WeblogNG](https://www.weblogng.com) iOS client library follows an easy three-step process:

1. add the WNGLogger library dependency to your project
2. integrate the WNGLogger library into your application
3. create dashboard and charts with your metrics

### Add the WNGLogger library dependency to your project ###

The WNGLogger library is available via CocoaPods and is the recommended installation path.

You can install it by adding a WNGLogger dependency to your Podfile:

``` 
# depend on weblog-ng-client-ios tag 0.6.0
pod 'WNGLogger', :git => 'https://github.com/weblogng/weblogng-client-iOS.git', :commit => '830b996'
```

Execute ```pod install```. There should be some output like:
```
$ pod install
Analyzing dependencies
Pre-downloading: `WNGLogger` from `https://github.com/weblogng/weblogng-client-iOS.git`, commit `830b996`
Downloading dependencies
Using AFNetworking (2.0.3)
Installing WNGLogger (0.6.0)
Generating Pods project
Integrating client project
```

### Integrate the WNGLogger library into your application ###

1. sign-up for [WeblogNG](https://www.weblogng.com)
2. add the WNGLogger header file
3. instantiate the Logger object using your api key
	1. find or generate an api key on your WeblogNG [account page](https://www.weblogng.com/app/account.html)
	2. recommendation: Store the sharedLogger in a convenient place to make it easy to use throughout the application
4. send metrics with the values recorded by your application

### Example ###

Here is some example code taken from the (super-simple) [WeblogNG iOS Sample App](https://github.com/weblogng/weblogng-client-ios-sample-app) for iOS that demonstrates the basic usage:

```Objective-C
#import "WNGAppDelegate.h"
#import WNGLogger/logger.h

@implementation WNGAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    NSString *apiKey = @"specify your api key here";

    [WNGLogger initSharedLogger:apiKey];

    [self someIntensiveLogic];

    return YES;
}

- (void) someIntensiveLogic {
    NSString *metricName = @"sample-app-someIntensiveLogic";
    [[WNGLogger sharedLogger] recordStart:metricName];

    int millis_to_sleep = 500 + arc4random_uniform(250);
    float seconds_to_sleep = ((float) millis_to_sleep) / 1000;

    [NSThread sleepForTimeInterval:seconds_to_sleep];

    [[WNGLogger sharedLogger] recordFinishAndSendMetric:metricName];
}

@end<commit_msg>Update README with client library version 0.7.0 goodness:<commit_after>## Usage ##

Using the [WeblogNG](https://www.weblogng.com) iOS client library follows an easy three-step process:

1. add the WNGLogger library dependency to your project
2. integrate the WNGLogger library into your application
3. create dashboard and charts with your metrics

### Add the WNGLogger library dependency to your project ###

The WNGLogger library is available via CocoaPods and is the recommended installation path.

You can install it by adding a WNGLogger dependency to your Podfile:

```
pod 'WNGLogger', :git => 'https://github.com/weblogng/weblogng-client-iOS.git', :tag => '0.7.0'
```

Execute ```pod install```. There should be some output like:
```
$ pod install
Analyzing dependencies
Pre-downloading: `WNGLogger` from `https://github.com/weblogng/weblogng-client-iOS.git`, tag `0.7.0`
Downloading dependencies
Using AFNetworking (2.3.1)
Installing WNGLogger 0.7.0
Generating Pods project
Integrating client project
```

### Integrate the WNGLogger library into your application ###

1. sign-up for [WeblogNG](https://www.weblogng.com)
2. add the WNGLogger header file
3. instantiate the Logger object using your api key
	1. find or generate an api key on your WeblogNG [account page](https://www.weblogng.com/app/account.html)
	2. recommendation: Store the sharedLogger in a convenient place to make it easy to use throughout the application
4. send metrics with the values recorded by your application

### Example ###

Here is some example code taken from the (super-simple) [WeblogNG iOS Sample App](https://github.com/weblogng/weblogng-client-ios-sample-app) for iOS that demonstrates the basic usage:

```Objective-C
#import "WNGAppDelegate.h"
#import WNGLogger/logger.h

@implementation WNGAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    NSString *apiKey = @"specify your api key here";

    [WNGLogger initSharedLogger:apiKey];

    [self someIntensiveLogic];

    //time execution of an arbitrary block
    [[WNGLogger sharedLogger] executeWithTiming:@"sample-app-anExpensiveBlock" aBlock:^(void){
        int millis_to_sleep = 250 + arc4random_uniform(250);
        float seconds_to_sleep = ((float) millis_to_sleep) / 1000;
        [NSThread sleepForTimeInterval:seconds_to_sleep];
    }];

    return YES;
}

- (void) someIntensiveLogic {
    NSString *metricName = @"sample-app-someIntensiveLogic";
    [[WNGLogger sharedLogger] recordStart:metricName];

    int millis_to_sleep = 500 + arc4random_uniform(250);
    float seconds_to_sleep = ((float) millis_to_sleep) / 1000;

    [NSThread sleepForTimeInterval:seconds_to_sleep];

    [[WNGLogger sharedLogger] recordFinishAndSendMetric:metricName];
}

@end
{'fraction_non_alphanumeric': 0.09941187630430659, 'fraction_numerical': 0.016505406943653957, 'mean_word_length': 4.883928571428571, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 12, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3415645', 'n_tokens_mistral': 1645, 'n_tokens_neox': 1593, 'n_words': 520}