• Stars
    star
    171
  • Rank 222,266 (Top 5 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

AFNetworking meter - plugin to measure HTTP traffic of iOS applications

AFNetworkingMeter

AFNetworkingMeter demonstration

Overview

AFNetworkingMeter is a grateful child of AFHTTPRequestOperationLogger created by Mattt Thompson (@mattt) for AFNetworking library. It is not the one: there is also its closest brother and companion AFNetworkingLogger - they share similar design and are both built for the same purpose: to make a HTTP-logging routine for a daily basis of iOS/Mac development easy and informative.

Note. AFNetworkingMeter currently does not support statistics reporting for NSURLSession-based operations.

Installation

The recommended way is to install via Cocoapods:

Add into your Podfile:

pod 'AFNetworkingMeter', :git => 'https://github.com/stanislaw/AFNetworkingMeter'

And run

pod update

or you can just clone AFNetworkingMeter repository using git clone and copy the contents of its AFNetworkingMeter/ folder to your project.

Usage

You need to start AFNetworkingMeter somewhere. For example, your app's delegate is a good place to do this:

#import <AFNetworkingMeter.h>

- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [[AFNetworkingMeter sharedMeter] startMeter];

    return YES;
}

Then, whereever you need to know statistics for AFNetworking HTTP interactions, ask AFNetworkingMeter to produce a formatted report and feel free to print it into your Xcode console.

NSString *HTTPReport = [AFNetworkingMeter sharedMeter].formattedReport;
NSLog(@"Let's see the HTTP Report: %@", HTTPReport);

Lazy reporting

...

Server errors and connection errors

Clarify their meaning as soon as possible as they can interfere...

TODO

...

Notes

  • Currently AFNetworkingMeter calculates HTTP headers size using -[NSPropertyListSerialization dataFromPropertyList:... (-[NSURLRequest allHTTPHeaderFields] => NSData). Let me know if there is a more precise way of doing this.
  • This line is designated for excuses about Russian/Ukrainian english that probably resulted in some misspelings exist somewhere in this README. The author will be thankful for any spelling corrections that might appear.

Credits

AFNetworkingMeter was created by Stanislaw Pankevich.

Thanks to Marina Balioura (@mettta) for her assistance in working out the design of the formatted report AFNetworkingMeter produces. Invaluable!

AFNetworkingMeter is a plugin for AFNetworking library created by Mattt Thompson.

AFNetworkingMeter is inspired by the design of another AFNetworking plugin AFHTTPRequestOperationLogger, that was as well created by Mattt Thompson.

Copyright

Copyright (c) 2013, Stanislaw Pankevich. See LICENSE for details.

Bitdeli Badge

More Repositories

1

awesome-safety-critical

List of resources about programming practices for writing safety-critical software.
Python
1,537
star
2

SoftwareDesignHeuristics

Heuristics for software design, development, testing, and maintenance programming.
122
star
3

LLVM-Cheatsheet

LLVM, clang, ninja, dyld and others.
Makefile
43
star
4

simple_roles

Simple roles system for Rails apps
Ruby
41
star
5

AFNetworkingLogger

AFNetworking logger - plugin providing network logging for iOS applications
Objective-C
25
star
6

cantango_editor

[Discontinued] Nice interface to edit Cantango's permissions
Ruby
24
star
7

CompositeOperations

Composite operations framework based on top of NSOperation/NSOperationQueue.
Objective-C
21
star
8

posix-macos-addons

Some missing bits of POSIX for macOS.
C++
16
star
9

carrier

[Discontinued] Raw github-like private messaging system to reuse across Rails apps. It is a mountable Rails 3.1 engine.
Ruby
10
star
10

carrierwave-vips-benchmarks

Perfomance benchmarks of ruby-vips library working behind CarrierWave::Vips uploader compared with native CarrierWave uploaders
Ruby
8
star
11

Examples

Single place for examples I create: iOS, Mac OS, Cocoa, XCTest, MapKit, Make, Flex/Bison etc.
8
star
12

EchoLogger

Fast and easy way to log things.
C
7
star
13

berlin-software-verification-meetup

Berlin Software Verification Meetup (Berlin, but online meetups are also planned, see the Program).
Coq
6
star
14

cutter

Two-methods gem for easy method inspection and simple performance measurements.
Ruby
5
star
15

UIKitExtensions

Collection of extensions for UIKit framework.
Objective-C
5
star
16

NSStringFromAnyObject

NSString representations for arbitrary C/Objective-C objects.
Objective-C
4
star
17

truncate-vs-count

Repository demonstrating a great advantage of performing checks of empty tables when cleaning tables with :truncation strategy
Ruby
4
star
18

jquery_collapse

One more jQuery Collapse plugin variation. Persists open/closed states beetween requests.
JavaScript
3
star
19

Yadic

Command-line dictionary powered by Yandex.Dictionary API and written as exercise in learning Haskell.
Haskell
3
star
20

alltext

Command-line tool to debug strings produced by other command-line tools. It is a friendlier version ot `cat -ve`.
Rust
3
star
21

FoundationExtensions

Collection of extensions for Foundation framework.
Objective-C
2
star
22

NSOperationQueueController

Wrapper around NSOperationQueue that provides additional control capabilities.
Objective-C
2
star
23

Talks

HTML
2
star
24

tutorials

Various tutorials I'm going to store here to avoid writing a personal blog
2
star
25

UISpec.app

Swift
1
star
26

Hashcode

HashCode is a russian StackOverflow. This repo contains code samples that I use to feed the discussions in the HC topics, that I participate in there.
Objective-C
1
star
27

SenTestingKitIssue

Good practice of running SenTestCase tests using AFNetworking
Objective-C
1
star
28

Clusterize

Experiments with clustering algorithms.
Objective-C
1
star
29

GitStats

Bash scripts to see the stats for Git projects: top committers, contribution history, most changed files.
Python
1
star
30

spj

Draft of JSON parser. It is being written as an exercise in learning C and is being driven by discussion on HashCode.Researches (Russian analogue of StackOverflow).
C
1
star
31

vadim-moghilnitsky

Мемориальная страница моего деда Вадима Могильницкого / Memorial page of my grandfather Vadim Moghilnitsky.
HTML
1
star