MeasurementKit is a library that implements open network measurement methodologies (performance, censorship, etc.) and targets mobile platforms (Android and iOS).
It is meant to be embedded by third party applications with specific network measurement needs and/or to be used by researchers as a basis to implement novel tools.
Currently it implements the following high-level tests:
the network diagnostic tool network performance test
It contains building-block functionalities useful to implement your own tests. More in detail it currently implements:
TCP connection (with which you can create a TCP connection towards and endpoint, receive and send data)
DNS client (with which you can resolve and reverse-resolve A and AAAA records using arbitrary name servers)
HTTP client (with which you can send HTTP/1.1 requests and receive and parse the corresponding responses)
traceroute for Android (with which you can send individual traceroute probes with a specified payload and TTL)
mlab-ns client (with which you can interact with Measurement Lab backend to know the server with which to run tests)
the functionality to communicate with the OONI collector
In the short term we plan to add to MeasurementKit:
Other functionalities that we would like to add are building-blocks functionalities such as uTP, and traceroute for iOS.
The following index illustrates the content of the remainder of this file:
- How to clone the repository
- How to test a specific branch
- How to build MeasurementKit
- How to use MeasurementKit
How to clone the repository
To clone MeasurementKit repository, do:
git clone https://github.com/measurement-kit/measurement-kit
How to test a specific branch
If you need to checkout a specific branch (say
feature/foo) for testing
it, clone the repository and then type:
git fetch origin git checkout feature/foo
Then proceed with the instruction to build and test MeasurementKit.
For more detailed instructions see contributing instructions.
How to build MeasurementKit
How to build MeasurementKit on a Unix-like system
Very briefly, to build from the git repository do:
./autogen.sh ./configure make
See the Unix tutorial for more details.
How to test MeasurementKit on a Unix-like system
Once you have built MeasurementKit, run tests like:
How to build MeasurementKit on Android
To compile MeasurementKit for Android, see the README.md file contained in
build/android directory of this repository.
How to build MeasurementKit on iOS
Having Xcode command line tools installed, run:
See the iOS tutorial for more info.
How to add MeasurementKit to an Xcode project.
Make sure your Podfile looks like this:
target 'YourTargetNameHere' do pod 'measurement_kit', :git => 'https://github.com/measurement-kit/measurement-kit.git', :branch => 'stable' end
pod install (or
pod update) and remember to open the
.xcworkspace rather than the
.xcodeproj. See the iOS tutorial for more info.