Giter Club home page Giter Club logo

vpipe's Introduction

vlang-build-pipeline

vpipe

experimental log pipeline chain parser in vlang

Status

  • Experimental, Hackish, Amateurish. Do NOT use this. 💣

Parsers

  • logfmt
  • json
  • regex

Dummy Functions

  • count()
  • avg()

Usage

logfmt
echo "some=logs are=boring" | vpipe 'logfmt'

{ "some": "logs", "are": "boring" }
logfmt + json
echo "some=logs are=boring counter=100" | vpipe 'logfmt | json counter'

100
regex
echo 'http://www.ciao.mondo/pera.html' \
  | vpipe 'regex (?P<format>https?)|(?P<format>ftps?)://(?P<token>[\w_]+.)+'

{"format":"http","token":"html"}

🕐 Benchmark

vpipe
# hyperfine --warmup 3 'cat /tmp/test.log | vpipe "logfmt"'
Benchmark 1: cat /tmp/test.log | vpipe "logfmt"
  Time (mean ± σ):       1.3 ms ±   0.1 ms    [User: 1.8 ms, System: 0.5 ms]
  Range (min … max):     1.1 ms …   1.7 ms    1428 runs
angle-grinder
# hyperfine --warmup 3 "cat /tmp/test.log |  ag '* | logfmt'"
Benchmark 1: cat /tmp/test.log |  agrind '* | logfmt'
  Time (mean ± σ):       4.5 ms ±   0.2 ms    [User: 2.4 ms, System: 3.2 ms]
  Range (min … max):     1.8 ms …   4.9 ms    544 runs

vpipe's People

Contributors

lmangani avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.