Coder Social home page Coder Social logo

Ability to Delete Mocks about smocker HOT 2 OPEN

joshua-temple avatar joshua-temple commented on June 1, 2024 12
Ability to Delete Mocks

from smocker.

Comments (2)

gwleclerc avatar gwleclerc commented on June 1, 2024

Hi,
I have some questions:

  • Do you use sessions ?
  • How many mocks are load per session during your 150 tests ?
  • Do you have any memory issue ?
  • How many calls does it receive at the same time?

Currently Smocker is not necessarily optimized. It loads everything in memory and simply loops over each mock of the current session every time it receives a call. You can see it here: https://github.com/smocker-dev/smocker/blob/main/server/handlers/mocks.go#L53

This can be optimized using go routines to retrieve matched mocks faster but I'm not sure it will reduce the CPU usage.

from smocker.

joshua-temple avatar joshua-temple commented on June 1, 2024

@gwleclerc thank you for the reply!

Do you use sessions ?

Currently not using sessions, as to my understanding, you can only use a single session at a time.

How many mocks are load per session during your 150 tests ?

I'd guesstimate somewhere around ~20 mocks per test, each being unique mocks.

While there are varying degrees of overlap between mocks, between tests, they are ultimately unique in smocker's eyes.

Do you have any memory issue ?

We did at first, but set a static retention value as we aren't currently interested in validating the mock payload was as expected, because we're inherently validating that with downstream changes in the logic. If the mock didn't return as expected, the data after the fact wouldn't be shaped as expected.

How many calls does it receive at the same time?

Thats a tough gauge but I will look into how I can assert that for you and get back to you asap.

from smocker.

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.