Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/b-2019-apt-test/divider

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/b-2019-apt-test/divider

  • v0.0.0-20190227091429-aae503c2f3e8
  • Source
  • Go
  • Socket score

Version published
Created
Source

Divider

Divider is a tiny CLI tool intended for passing aptitude test. Divider reads a stream of JSON-encoded jobs from file, processes them with call to external library and writes results to another file in CSV format.

Getting started

Install with go install:

$ go get -u github.com/b-2019-apt-test/divider
$ go install github.com/b-2019-apt-test/divider/cmd/divider

Usage

The only required argument is the path to the file with jobs:

$ divider -i jobs.json

By default, divider writes results to divider.csv file at the same directory level. You can specify alternative path:

$ divider -i jobs.json -o results.csv

You can specify division method with -m flag:

$ divider -i jobs.json -m cgo

Available methods: go, cgo, syscall (default). Option -z has precedence over the -m flag: if both defined, go method will be used.

Run divider without arguments to see the full usage info.

Dependencies

Divider depends on external library math.dll: it's assumed that the library is already installed on the system. Although, you can run divider with its own division implementation using -z option:

$ divider -i jobs.json -z

For cgo method to work, the library must be installed on the system as magic.dll.

Benchmarks

Benchmarks for calldiv and cgodiv demonstrate almost linear scaling:

$ go test github.com/b-2019-apt-test/divider/pkg/div/... -v -run none -bench=Parallel$ -benchmem -benchtime=5s -cpu 1,2,4,8,16,32,64,128

Build and test

pkg-config is used for cgo dependencies management. You can find sample config under the build directory of the repository.

FAQs

Package last updated on 27 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc