Giter VIP home page Giter VIP logo

Comments (6)

allykzam avatar allykzam commented on May 5, 2024 2

@drozdowsky: for my example of database connections, I did exactly that. I spent a half hour yesterday throwing together a windows service that responds to simple commands over the network. Now my init command for each data point is nc 127.0.0.1 1234, and they all reuse the same database connections.

While this definitely improves things for my company's database servers, it just moves the issue to my local system. Now I have 15 instances of sh -c $localconnection and 15 instances of nc 127.0.0.1 1234 running on my system.

from sampler.

Asherslab avatar Asherslab commented on May 5, 2024

very much already a thing: https://github.com/sqshq/sampler#variables

from sampler.

allykzam avatar allykzam commented on May 5, 2024

@Asherslab this just reuses the command path and arguments, it doesn't reuse the same instance of the init application. In the example I gave, showing both CPU load and RAM use, using a variable for init still causes two instances of the command to be run, in my case causing two separate connections to the same database server.

from sampler.

drozdowsky avatar drozdowsky commented on May 5, 2024

Currently using sampler and I agree that global init looks like a must.
But.
Do we really have to have it in sampler? I think this can also can be handled by script/other app (that keeps session)

from sampler.

Asherslab avatar Asherslab commented on May 5, 2024

true we could have it elsewhere. but having it in sampler would be nice
i'm sure adding a simple boolean to the variables part to share the same "session" would work fine

from sampler.

18829525501 avatar 18829525501 commented on May 5, 2024

i agree with you.
usually i monitoring database status with some SELECT cmd, in most situation it is sufficient to create one DB connection, otherwise it will result resourses wasting.

from sampler.

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.