soniq 0.0.1

  • Installing
  • Versions
  • 34


Multithreaded, futuristic HTTP benchmarking tool.

Use soniq to estimate your server's response latency under different levels of load.

soniq can be used from the command-line, but you can also embed its API into your own applications.


Install it to your PATH:

pub global activate soniq

Or add the API as a dependency in your pubspec.yaml:

  soniq: ^0.0.0


soniq is available an executable with the following usage:

usage: soniq [options...] <url>

-h, --[no-]help      Print this help information.
-f, --format         The format to print results in. Allowed: ["json", "stdout"]..
-j, --threads        The number of isolates (threads) to run tests in.
-c, --connections    The number of concurrent connections to maintain.
-x, --command        An optional shell command to run prior to testing.
-d, --duration       The length, in milliseconds, of the stress test.
-o, --out            A file path to write results to.
-p, --profile        The name of the profile to run, if any.

Instead of manually specifying options on each run, you can create a soniq.yaml file with multiple profiles.

A single profile takes this shape:

  format: stdout # Can also be "json"
  threads: 5 # Number of threads to spawn
  connections: 5 # Total number of HTTP connections to maintain. Each thread maintains (connections / threads).
  command: # Runs *asynchronously* before testing. Use this to start a server or other process whenever you test.
  duration: 30000 # In milliseconds. Converted to a Dart `Duration`.

Your soniq.yaml should look like this:

If you provide a default profile, then if you specify a different profile, its settings will be merged. This allows you to provide common characteristics among profile, like quasi-inheritance:

  connections: 10
  threads: 10
  url: http://localhost:3000
  url: http://localhost:3000/api/json

In the above case, running soniq -p json would be the same as running soniq -c 10 -t 10 http://localhost:3000/api/json.

Command-line options will override options from a soniq.yaml, you can still run something like soniq -p json -c 20.


To make integration easier on yourself, just use the Runner class, and pass it a Configuration object. The return value will be a RunnerResult report with statistics and tallied data attached.


import 'package:soniq/soniq.dart';

main() async {
  var config = new Configuration(
    url: 'http://localhost:3000',
    threads: 15,
    connections: 60,
    duration: new Duration(minutes: 3)
  var runner = new Runner(config);
  var report = await;
  print('Average latency (microseconds): ' + report.averageLatency.toStringAsFixed(2));

The Configuration class directly corresponds to the YAML configuration specified earlier in this document. There are several factory constructors available to build configurations at your convenience.

main() {
  var userConfig = new Configuration(...);
  // Merge with defaults
  var mergedConfig = new Configuration.merge(Configuration.DEFAULT, userConfig);
  // Merge multiple
  var multiMerged = new Configuration.mergeAll([...]);
  // Copy existing config
  var copy = new Configuration.copy(multiMerged);

Planned Features

  • WebSocket benchmarking
  • Running tests across multiple CPU's/computers

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate soniq

2. Use it

The package has the following executables:

$ soniq

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  soniq: "^0.0.1"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:soniq/soniq.dart';
Version Uploaded Documentation Archive
0.0.1 Jun 8, 2017 Go to the documentation of soniq 0.0.1 Download soniq 0.0.1 archive
0.0.0 Jun 7, 2017 Go to the documentation of soniq 0.0.0 Download soniq 0.0.0 archive


We analyzed this package on Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
65 / 100
Reflects how tidy and up-to-date the package is. [more]
71 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

Primary library: package:soniq/soniq.dart with components: io, isolate.


  • Maintain

    Changelog entries help clients to follow the progress in your code.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 3 errors 1 hint.

    Strong-mode analysis of lib/src/runner.dart failed with the following error:

    line: 50 col: 24
    The argument type '(List<dynamic>) → Null' can't be assigned to the parameter type '(dynamic) → void'.

    Strong-mode analysis of lib/src/pubspec.update.g.dart gave the following hint:

    line: 10 col: 14
    'JSON' is deprecated and shouldn't be used.

  • Package is getting outdated.

    The package was released 57 weeks ago.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use soniq.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0
args ^0.13.4 0.13.7 1.4.3
check_for_update ^1.0.0 1.0.1
cli_util ^0.1.1 0.1.3
console ^2.2.4 2.2.4 3.0.0
http ^0.11.3 0.11.3+17
kilobyte ^0.1.0 0.1.0+2
merge_map ^1.0.0 1.0.0
string_scanner ^1.0.0 1.0.2
term_glyph ^1.0.0 1.0.0
yaml ^2.1.12 2.1.14
yamlicious ^0.0.5 0.0.5
Transitive dependencies
analyzer 0.29.5 0.32.3
async 2.0.7
build 0.7.3 0.12.7
charcode 1.1.2
code_builder 1.0.1 3.1.1
collection 1.14.10
concepts 0.2.0
convert 2.0.1
crypto 2.0.6
csslib 0.14.4
dart_style 1.0.1 1.1.2
either 0.1.8
func 0.1.1 1.0.0
glob 1.1.6
html 0.13.3+1
http_parser 3.1.2
isolate 0.2.3 2.0.1
logging 0.11.3+1
matcher 0.12.3
meta 1.1.5
option 1.2.0
package_config 1.0.3
path 1.3.9 1.6.1
plugin 0.2.0+2
pub_semver 1.4.1
pubspec 0.0.15
quiver 0.21.4 0.29.0+1
quiver_iterables 1.0.1
source_span 1.4.0
stack_trace 1.9.2
stuff 0.0.7
typed_data 1.1.5
uri 0.11.2
utf 0.9.0+4
vector_math 1.4.7 2.0.7
watcher 0.9.7+9
Dev dependencies
angel_framework ^1.0.0
build_runner ^0.3.0