1# Measurement Kit
2
3> Network measurement engine
4
5[![GitHub license](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://raw.githubusercontent.com/measurement-kit/measurement-kit/master/LICENSE) [![Github Releases](https://img.shields.io/github/release/measurement-kit/measurement-kit.svg)](https://github.com/measurement-kit/measurement-kit/releases) [![Github Issues](https://img.shields.io/github/issues/measurement-kit/measurement-kit.svg)](https://github.com/measurement-kit/measurement-kit/issues)
6
7- - -
8
9| branch | Unix      | coverage  | Windows  |
10|--------|-----------|-----------|----------|
11| master | [![Build Status](https://img.shields.io/travis/measurement-kit/measurement-kit/master.svg?label=travis)](https://travis-ci.org/measurement-kit/measurement-kit) | [![codecov](https://codecov.io/gh/measurement-kit/measurement-kit/branch/master/graph/badge.svg)](https://codecov.io/gh/measurement-kit/measurement-kit) | [![Build status](https://img.shields.io/appveyor/ci/bassosimone/measurement-kit/master.svg?label=appveyor)](https://ci.appveyor.com/project/bassosimone/measurement-kit/branch/master) |
12
13Measurement Kit is a library that implements open network measurement
14methodologies (performance, censorship, etc.) for Android, iOS, Windows,
15macOS, and Linux systems.
16
17It is meant to be embedded by third party applications with specific network
18measurement needs and/or to be used by researchers as a basis to implement
19novel tools.
20
21Please, refer to the [include/measurement_kit](include/measurement_kit)
22folder documentation for an up-to-date list of available tests.
23
24## API and examples
25
26Measurement Kit exposes a simple C-like API that is described in detail
27in the [include/measurement_kit](include/measurement_kit) folder
28documentation. You can find examples of usage of such API into the
29[example](example) folder.
30
31## Generic Unix instructions
32
33You need to have the autotools, a C++14 capable C++ compiler, a C++14
34capable C++ library, a C11 capable C compiler, and all the dependencies
35installed. For current information, we encourage you to read the very simple
36build script that we use on Travis CI to setup a Unix environment, from
37which you can gather up-to-date information regarding required packages on
38a Debian like system. To this end, please refer to the content of the
39[.ci/travis](.ci/travis) folder.
40
41With all the dependencies statisfied, build with:
42
43```
44./autogen.sh
45./configure
46make
47sudo make install    # optional, if you want to install to `/usr/local`
48sudo /sbin/ldconfig  # required only on Linux if you install
49```
50
51The configure script will also provide advice if a dependency is missing. Also,
52`./configure --help` can be useful.
53
54## Homebrew instructions
55
56Please check the [measurement-kit/homebrew-measurement-kit](
57https://github.com/measurement-kit/homebrew-measurement-kit) tap
58for Homebrew.
59
60## Mingw-w64 instructions
61
62We (cross) compile binaries for Windows using the [Mingw-w64](
63https://mingw-w64.org/doku.php) compiler distribution. The scripts
64we use to do that are also part of the [
65measurement-kit/homebrew-measurement-kit](
66https://github.com/measurement-kit/homebrew-measurement-kit) tap
67for Homebrew.
68
69We also build MK using Mingw-w64 on Windows when running AppVeyor
70integration tests. To see how we do that, please check the
71[.ci/appveyor](.ci/appveyor) folder.
72
73## Android instructions
74
75For cross-compiling Measurement Kit for Android, please refer to the
76[measurement-kit/homebrew-measurement-kit](
77https://github.com/measurement-kit/homebrew-measurement-kit) repository. For
78integrating Measurement Kit cross-compiled for Android with Java classes
79that you can use from Android, please see [measurement-kit/android-libs](
80https://github.com/measurement-kit/android-libs). For how to use Measurement
81Kit in an Android project, please see [measurement-kit/android-example](
82https://github.com/measurement-kit/android-example).
83
84## iOS instructions
85
86For cross-compiling Measurement Kit for iOS, please refer to the
87[measurement-kit/homebrew-measurement-kit](
88https://github.com/measurement-kit/homebrew-measurement-kit) repository. For
89integrating Measurement Kit cross-compiled for iOS into a framework
90that you can use from iOS, please see [measurement-kit/mkall-ios](
91https://github.com/measurement-kit/mkall-ios). For how to use Measurement
92Kit in an iOS project, please see [measurement-kit/ios-example](
93https://github.com/measurement-kit/ios-example).
94
95## How to develop for Measurement Kit
96
97To clone Measurement Kit repository, do:
98
99    git clone --recursive https://github.com/measurement-kit/measurement-kit
100
101See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
102