Giter Site home page Giter Site logo

Large project about go-callvis HOT 7 CLOSED

ondrajz avatar ondrajz commented on August 21, 2024
Large project

from go-callvis.

Comments (7)

ondrajz avatar ondrajz commented on August 21, 2024 4

I have noted what you suggested with adding option to ignore types and I will consider how to best implement this to provide better control over filtering the output.


However you misunderstood what I meant. I was not suggesting for you to move your code or anything. My point was only about improving the output of the go-callvis for such large call graph as you provided.

In the picture below I marked the areas with calls which are impossible to distinguish from each other. In situations like this there is little benefit from generating this without using deliberate limits and ignores. Maybe it could be improved by using -minlen which makes the output wider so there is more space for the edges, but I think it could be improved further with some better config of dot. I have to play around with some different configurations.

clutter

from go-callvis.

ondrajz avatar ondrajz commented on August 21, 2024

Could you please share the command you are using?

Are you using -limit and -ignore option? Because by default ALL the calls inside program are analysed; that means also calls inside std packages.

I recommend using -limit with prefix of your project base path so only calls inside this are analysed and also -ignore to set path prefix/es (separate by comma) which are not important for you.

from go-callvis.

jozn avatar jozn commented on August 21, 2024

I tested with different combinations of limit ,some crashed, some worked, some scaled. finally i could generate svg and better resolution images (0.55 and .8).

one of the command that worked:
go-callvis -focus models -group pkg -limit ms/sun/models ms/sun | dot -Tsvg -o models12.svg
ms/sun/models is the big package.

for other smaller package it works very good.
thanks for your time and library.

from go-callvis.

ondrajz avatar ondrajz commented on August 21, 2024

So did you end up with some useful result, or not?

Are there other packages inside ms/sun/models directory? Because -limit works as prefix so any package inside that folder will be included as well.


By the way, do you mind sharing the result? I am very curious about real world examples so I can see how it behaves. If you can't share I understand.

from go-callvis.

jozn avatar jozn commented on August 21, 2024

So did you end up with some useful result, or not?

Yes i did. Thanks your tool is good.

Are there other packages inside ms/sun/models directory? Because -limit works as prefix so any package inside that folder will be included as well.

No its the only one.

This is one :http://www.filedropper.com/base_13
this is mostly generated codes (orm like):http://www.filedropper.com/models11

from go-callvis.

ondrajz avatar ondrajz commented on August 21, 2024

Woah, the models one is quite large indeed. Even the base one is little harder to view.

However, there might be a nice solution for this. I can see that functions inside some package or type are all positioned on the same level, even though I don't see any reason they would need to be.

I'll play around with some output configurations to see if I could get rid of this constraint. It would make large packages like this much clearer.

Thank you for sharing!

from go-callvis.

jozn avatar jozn commented on August 21, 2024

I can see that functions inside some package or type are all positioned on the same level, even though I don't see any reason they would need to be.

They don't need to be, but by putting things in different package i will a have dependency cycle problem.
all generated code goes to one file so no problem.

Most of what has been outputted are struct types that are internal to generated codes and are prefixed with "__" if the this tools has the ability to ignore types that match certain prefix or keywords that would be great.

from go-callvis.

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.