postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.82k stars 837 forks source link

Feature request: Option to disable logging while running a collection from Postman #9544

Closed mstaalesen closed 2 months ago

mstaalesen commented 3 years ago

Is your feature request related to a problem? Please describe. When running a large collection (over 100 requests), Postman is really slow after it is finished running. To my surprise, it seems that the reason for this is that Postman is busy logging all the requests to the Postman Console. I assume this is a key feature in how things are done, but it would be very nice if we could have an option to disable this in settings. Postman uses up to 5 minutes with cpu at 100% after the collection has finished executing.

Describe the solution you'd like I would like to have an option to disable logging to postman console. (Even though my requests has console.log in them or not). This should be an opt-in feature, where default is that it logs, but when selected it does as requested.

Describe alternatives you've considered There really is no way around this issue, it would perhaps be to export the collection to file and then run newman. But that disrupts the workflow.

Additional context N/A

DannyDainton commented 3 years ago

Hey @mstaalesen

Are you experiencing this problem in the new V8 or web version of Postman?

mstaalesen commented 3 years ago

This is in v8.0.4 (was also present on 7.x) on Mac.

DannyDainton commented 3 years ago

Could you provide some examples of the cpu usage you described, please?

mstaalesen commented 3 years ago

Right, tried to figure out how to get a good log of this. But kind of new to mac, so using Activity Monitor and timing manually.

Restarting Postman v8.0.4, cpu is at around 0% CPU:

image

Postman is responsive and working as it expected. (Transition from Linux to Mac was extreme with regards to how much faster Postman feels on Mac compared to on Linux by the way)

Running a collection with only 11 requests (but with some being ran several times until an event has been indexed in the system under test), with 10 iterasions. CPU Jumps up to:

image

Not that high at all, but changing between tabs in postman is really sluggish now. (1-2 seconds to switch between two request-tabs)

After the requests are done, I would expect that cpu would/should drop to around 0% cpu again, but that is not the case:

image

In fact, it just increases:

image

And the only thing I can tell that Postman is doing at this time is write to Postman Console / log. Very often while executing the tests, I never look at these logs. I only need them for debugging purposes, which is why I would like to have this feature.

Memory before tests are executed:

image

Memory after the tests are done (but Postman still using CPU):

image

For a test that ran for approximately 5 minutes, It takes at least another 15-30 minutes before it is done logging all the requests (With console.log) to file. Even hiding the network logs (In Postman Console) does not seem to affect this for the better. They are still written, its just hidden.

I have even started wrapping all my console.log statements within a debug-check, and then have flag in the globals file to tell if it should log to file or not. But even if I disable logging of my own statements, it still writes the stuff like: POST URL GET URL etc, and that seems to take some time to.

Hope this clarifies enough.

nadavmov commented 3 years ago

I'm having the same problem running Postman v8.12.2 on windows. I'm running a collections with about 800 commands and wait a long while between each execution just to allow console log complete its task. I'm using the log while debugging a new collection but and when it's stabke enough. the log is redundant so I'd like to disable it. Furher more, if I try to run more than 800 commands in a single collection execution, postman app just crash because of memory limitations caused by the keeping the log. Therefore I've limited my script to 800 commands which make my work less efficient, especiaaly in night running scripts.

DellaMoraWalter commented 2 years ago

Same problem for me. I have very long collections and some are used to seed the environment so they are executed many times. After some time the calls to my backend become out of sync with the console log, than the execution of calls stops and finally postman crash. This happens on mac. If the console log is the cause of that and I can turn it of, for me is a good feature becouse in that situations I don't need the log.

DellaMoraWalter commented 2 years ago

An alternative can be a circular buffer with a configurable window of X messages traced and showed in console log.

dropfr4me commented 2 years ago

+1 from me. I am also having similar performance issues. I'd really like to see an enhancement to toggle console logging on/off from the desktop client and from Newman.

TamasSzalisznyi commented 2 years ago

+1, it was a massive load test performed by postman really well, but logs are still coming, even more than an hour ago the test are finished.

https://user-images.githubusercontent.com/55410553/140720835-9b93aedc-4c9a-4a43-ab0d-6bfecd499c73.mp4

NelemaniA commented 2 years ago

+1, I'm experiencing the same problem over here. Postman does also become very slow sometimes, probably because of the console log thats still being filled.

carlan-eis commented 2 years ago

I was having the same after running a collection for over 10k iterations.

I didn't have the need to repeat the process again yet. However, I would try to uncheck all types of logs from console as a tentative to fix this temporarily.

On the console, click on the all logs and uncheck them all.

image
NelemaniA commented 2 years ago

Too bad, unchecking the log-types doesn't help, since the log is still being appended in the background. So I guess, didn't try, that performance is still affected after some runs. What I did see is when I check the log-type on again the log is still present (and being appended while my testrun is already finished). The only thing that works for me is clearing the log after every run of my complete collection, and clearing it every once in a while after a number of single requests that I have run. To prevent that postman becomes unresponsive/slow.

rmushfiqur2 commented 2 years ago

I would also like to have this feature to mitigate performanace issue.

jblayter commented 2 years ago

Yes please! We need a way to disable the console logging 100%. If we could do this via JavaScript API that would be best so we can control it as needed. I use this for some testing of flows that can be up to 24,000 requests and the console just dies a slow and painful death.

AlexanderB-C commented 1 year ago

+1 from me I have a flow running since ~17 hours which already made ~100.000 post requests and the console log is 16 (!!!) hours behind. It is just logging requests from 00:40 (now it is 16:40). Postman flow designer would be great to deal with necessary 1-time actions like addind virtual stock to all items in a cloud ERP but it is not very usable in practice because it is eating up all my RAM and a lot of my CPU while doing so...

MaxLundstroem commented 4 months ago

Issue persists. I would like this implemented aswell

ChristineMcClureEBSCO commented 4 months ago

Ditto.

DannyDainton commented 2 months ago

In the latest version of the platform - There is an additional opion on the runner to turn off the logs for a run:

Screenshot 2024-07-17 at 16 03 31