octobox
octoScope API
Last updated a year ago by akatebi .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install octobox 
SYNC missed versions from official npm registry.

Node.js API

Example throughput test.

import Octobox from "Octobox";
const { endpoint, throughputTest, trafficPair } = new Octobox();

const test = async () => {
  // Create Throughput Test
  const testInput = {
    name: "Basic Test",
    model: "A",
    revision: "1",
    interval: 1.0,
    testDuration: "10",
    trainingTime: 2
  };
  const { id: testId } = await throughputTest.create(testInput);

  // Get the ids of existing endpoints
  const { id: from } = await endpoint.readByAddress("172.20.0.1");
  const { id: to } = await endpoint.readByAddress("172.20.0.2");

  // Create Traffic Pair
  const trafficPairInput = {
    id: testId,
    name: "Traffic",
    from,
    to,
    active: true,
    bitrate: "1G"
  };
  await trafficPair.create(trafficPairInput);

  // Start the test
  await throughputTest.start(testId);
};

test();

Use with Babel node -r babel-register -r babel-polyfill test.js

Current Tags

  • 0.0.3                                ...           latest (a year ago)

3 Versions

  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |