npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sipp-js

v0.1.3

Published

Wrapper library for SIPp

Downloads

197

Readme

SIPP

sipp-js is a wrapper for sipp. The purpose of this library is to simplify the creation of SIPp instances. It is not intended to be a full SIPp implementation.

This library requires the sipp executable to be installed on the system.

Kind: global class

new SIPP(options)

Constructs a new SIPP object.

| Param | Type | Description | | --- | --- | --- | | options | SIPPOptions | Configuration object for SIPP | | options.remoteHost | string | Remote host to connect to | | options.localPort | number | Local port to use for SIP signaling | | options.timeout | number | Timeout in milliseconds to quit SIPp. Defaults to 30 seconds. |

Example

const SIPP = require("sipp-js");

const sipp = new SIPP({
 remoteHost: "remote.host.com",
 localPort: 5060,
 timeout: 30000
});
sipp.setUsername("user");
sipp.setPassword("password");
sipp.setScenario(`${process.cwd()}/scenarios/etc/arc.xml`);
sipp.start();

assert.ok(result.stderr == null)

sipP.setUsername(username) ⇒ SIPP

Optional username for SIP authentication.

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | username | string | Username for SIP authentication |

sipP.setPassword(password) ⇒ SIPP

Optional password for SIP authentication.

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | password | string | Password for SIP authentication |

sipP.withScenario(scenarioFile) ⇒ SIPP

Scenario file to use for SIP signaling.

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | scenarioFile | string | Scenario file to use for SIP signaling |

sipP.withReportFreq(frequency) ⇒ SIPP

Statistics report frequency.

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | frequency | number | Frequency in seconds |

sipP.withTraceStat() ⇒ SIPP

Dumps all statistics in <scenario_name>_.csv file.

Kind: instance method of SIPP

sipP.withTraceScreen() ⇒ SIPP

Dump statistic screens in the <scenario_name>__screens.log file when quitting SIPp.

Kind: instance method of SIPP

sipP.withTransportMode(transportMode) ⇒ SIPP

Selects the transport mode to use.

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | transportMode | TransportMode | Transport mode to use |

sipP.withInf(info) ⇒ SIPP

Inject values from an external CSV file during calls into the scenarios.

Kind: instance method of SIPP
Returns: SIPP - Also see setInfIndex

| Param | Type | Description | | --- | --- | --- | | info | string | CSV file to use |

sipP.setInfIndex(info, index) ⇒ SIPP

Create an index of file using field. For example -inf users.csv -infindex users.csv 0 creates an index on the first key.

Kind: instance method of SIPP
Returns: SIPP - Also see withInf

| Param | Type | Description | | --- | --- | --- | | info | string | CSV file to use | | index | number | Index of CSV file to use |

sipP.setVariable(variable, value) ⇒ SIPP

Sets a variable to a value. The variable must exist in the scenario.

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | variable | string | Variable to set | | value | string | Value to set |

sipP.withStats(fileName) ⇒ SIPP

Set the file name to use to dump statistics

Kind: instance method of SIPP
Returns: SIPP - Also see withReportFreq

| Param | Type | Description | | --- | --- | --- | | fileName | string | File name to use |

sipP.withCallRate(rate) ⇒ SIPP

Set the call rate (in calls per seconds).

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | rate | number | Call rate to use |

sipP.withCallLimit(limit) ⇒ SIPP

Set max simultaneous calls.

Kind: instance method of SIPP
Returns: SIPP - Also see withCallRate

| Param | Type | Description | | --- | --- | --- | | limit | number | Number of calls to make |

sipP.withCallRateIncrease(rate, time) ⇒ SIPP

Set rate increase (in calls per seconds).

Kind: instance method of SIPP
Returns: SIPP - Also see withCallRate

| Param | Type | Description | | --- | --- | --- | | rate | number | Rate increase to use | | time | number | Time to use |

sipP.withCallMax(calls) ⇒ SIPP

Set the number of calls to make.

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | calls | number | Number of calls to make |

sipP.withOpt(key, parameter) ⇒ SIPP

Sets an arbitrary parameter.

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | key | string | Option to set | | parameter | string | Value to set |

sipP.withTimeout(timeout) ⇒ SIPP

Sets a timeout to quit SIPp.

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | timeout | number | Timeout to use (in seconds) |

sipP.build() ⇒ string

Builds the command.

Kind: instance method of SIPP

sipP.start() ⇒ Promise.<Buffer>

Starts an instance of SIPp synchronously.

Kind: instance method of SIPP

sipP.startAsync(callback) ⇒ ChildProcess

Starts an instance of SIPp asynchronously.

Kind: instance method of SIPP

| Param | Type | Description | | --- | --- | --- | | callback | callback | Callback function |

sipP.stop()

Stops the instance.

Kind: instance method of SIPP