Coder Social home page Coder Social logo

Comments (5)

kputnam avatar kputnam commented on August 21, 2024

This can be accomplished with the current command line options, though it's tricky. I will propose an improvement in the next comment.

For instance to trace everything but procs whose name begins with "bad" or "old". This says "don't move past the first character ^ and fail if (bad|old) matches".

$ piggly trace --pattern '/^(?!bad|old)/'

Then to trace everything except procs whose name ends with "bad" or "old".

$ piggly trace --pattern '/(?!bad|old)...$/'

This shows how it starts to get complicated, and rejecting names that match somewhere between the start and end, like "an_old_proc" is much worse.

from piggly.

kputnam avatar kputnam commented on August 21, 2024

I think the commands should have options like --select and --ignore, and apply them in the order they were passed. That is, --ignore A --select B will ignore procedure names matching A unless it matches B. When passed --select B --ignore A procedure names matching B are selected unless it matches A.

Multiple options are additive so --select A --select B means "select anything matching A or B". Then --ignore X --ignore Y means "ignore anything that maches X or Y".

I don't like making it more complicated, but I think it remains simple for simple cases, and it makes complicated things possible.

from piggly.

kputnam avatar kputnam commented on August 21, 2024

Note currently the matches aren't performed against the schema name, just the procedure name. This will also be addressed.

from piggly.

lcoldiron avatar lcoldiron commented on August 21, 2024

Seems like a reasonable compromise to me.

from piggly.

kputnam avatar kputnam commented on August 21, 2024

Note I also added --dry-run to each command to print which procedures matched your filters. Filters can be exact string matches like --select 'public.foo' or regular expressions like --select '/public\./'.

from piggly.

Related Issues (20)

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.