Giter Club home page Giter Club logo

splitpipeline's Introduction

SplitPipeline

PowerShell v2.0+ module for parallel data processing. Split-Pipeline splits the input, processes parts by parallel pipelines, and outputs results. It may work without collecting the whole input, large or infinite.

Quick Start

Step 1: Get and install.

SplitPipeline is available as the PSGallery module SplitPipeline. In PowerShell 5.0+ or with PowerShellGet you can install it by this command:

Install-Module SplitPipeline

SplitPipeline is also available as the NuGet package SplitPipeline. Download it by NuGet tools or directly. In the latter case save it as ".zip", unzip, and use the directory "tools/SplitPipeline".

Step 2: In a PowerShell command prompt import the module:

Import-Module SplitPipeline

Step 3: Take a look at help:

help -full Split-Pipeline

Step 4: Try these three commands performing the same job simulating long but not processor consuming operations on each item:

1..10 | . {process{ $_; sleep 1 }}
1..10 | Split-Pipeline {process{ $_; sleep 1 }}
1..10 | Split-Pipeline -Count 10 {process{ $_; sleep 1 }}

Output of all commands is the same, numbers from 1 to 10 (Split-Pipeline does not guarantee the same order without the switch Order). But consumed times are different. Let's measure them:

Measure-Command { 1..10 | . {process{ $_; sleep 1 }} }
Measure-Command { 1..10 | Split-Pipeline {process{ $_; sleep 1 }} }
Measure-Command { 1..10 | Split-Pipeline -Count 10 {process{ $_; sleep 1 }} }

The first command takes about 10 seconds.

Performance of the second command depends on the number of processors which is used as the default split count. For example, with 2 processors it takes about 6 seconds.

The third command takes about 2 seconds. The number of processors is not very important for such sleeping jobs. The split count is important. Increasing it to some extent improves overall performance. As for intensive jobs, the split count normally should not exceed the number of processors.

See also

splitpipeline's People

Contributors

nightroman avatar mattkotsenas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.