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

pipeline-debugger

v1.0.5

Published

The MongoDB Aggregation Pipeline Debugger is a powerful tool designed to help you analyze and debug your aggregation pipelines

Downloads

3

Readme

MongoDB Aggregation Pipeline Debugger

MongoDB Logo

The MongoDB Aggregation Pipeline Debugger is a powerful tool designed to help you analyze and debug your aggregation pipelines. Aggregation pipelines in MongoDB can sometimes become complex, making it challenging to identify issues or bottlenecks. This debugger aims to simplify the debugging process by providing insights into the data flow and transformations within your aggregation pipeline.

Features

  • Step-by-Step Execution: Visualize the execution of your aggregation pipeline step by step, allowing you to see the intermediate results at each stage.

  • Data Preview: Gain insights into data transformations at various pipeline stages to track how it evolves after each step. Select from three engaging preview modes:

    • Console Mode: Observe data directly in the console, offering quick visual feedback.
    • File Log Mode: Access data through a dedicated log file, delivering a comprehensive view of the pipeline's impact.
    • File JSON Mode: Access data as structured JSON files, enabling you to easily analyze and share results.
  • Expression Evaluation: Evaluate and preview the results of complex expressions used in $project, $addFields, and other stages.

  • Bottleneck Identification: Identify stages that might be causing performance bottlenecks in your pipeline.

  • Export Results: Export intermediate or final results for further analysis or sharing with your team.

  • Interactive Interface: Interact with the pipeline execution, pause, and inspect data at any stage to gain deeper insights.

  • Error Tracing: Easily locate errors or unexpected behavior by observing the data transformation process in detail.

  • Visualization: Visual representation of the data flow and transformations aids in understanding and debugging.

  • Customizable Views: Tailor the display to focus on specific aspects of your data or pipeline.

  • Real-time Monitoring: Monitor execution progress in real-time, perfect for large pipelines.

Installation

You can install the package using npm:

npm install pipeline-debugger

API Reference

debugPipeline(model, pipeline, config)

Debugs a pipeline of stages in a model.

Parameters:

  • model (Object): The model to debug.
  • pipeline (Array): The pipeline stages to debug.
  • config (DebugConfig): Configuration options for debugging.

DebugConfig:

  • outputMode (string, optional): Output mode ('console', 'fileJson', or 'fileLog'). Default is 'console'.
  • debuggerCollectionPrefix (string, optional): Prefix for debugger collection names. Default is 'pipeline-debugger'.
  • skipStages (Array, optional): Stages to skip during debugging. Default is an empty array.
  • limit (number, optional): Maximum number of results to include in output. Default is 2.
  • shouldStringify (boolean, optional): Whether to stringify output objects. Default is true.
  • showQuery (boolean, optional): Whether to display the query stage in the output. Default is true.

Example

const { debugPipeline } = require('pipeline-debugger');

const model = /* ... */;
const pipeline = /* ... */;
const config = {
    outputMode: 'console',
    skipStages: [1, 3],
    limit: 5,
    shouldStringify: true,
    showQuery: true
};

debugPipeline(model, pipeline, config);

Package Information