-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement - Save/load request logs to/from disk #42
Comments
For this scenario I think implementing RequestLogExpirationDuration / MaxRequestLogCount is the easiest. About memory issues : I dont think that will be a real issue unless you send/receive complete byte[] array blob data like complete files. Note that I'm currently working on using netstandard/netcore 2.0 preview in relation to docker image. |
@phillee007 ; another question : are you available for code-reviews in the next weeks? Or do you have holiday planned? |
I go on holiday to Europe in a few days till October 5, but should be able
to look at some code while on planes/buses etc. Is it for the core 2 stuff?
Phil
…On 14/08/2017 7:27 PM, "Stef Heyenrath" ***@***.***> wrote:
@phillee007 <https://github.com/phillee007> ; another question : are you
available for code-reviews in the next weeks? Or do you have holiday
planned?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEEFow23fKvRYnCT-CYqzsPRP0D4l_XKks5sX_bOgaJpZM4O1XOe>
.
|
Ok. Just let me know if/when you need me to have a look. I could write the code too when i get back if you're busy. Holiday - Greece, Croatia, Italy, Hungary, Serbia :-) |
Just thinking, in one of the scenarios we have, the Wiremock standalone instance is used as either:
Sometimes the service can run for days, or weeks. When this happens and there are multiple developers using the standalone mock service, the request logs can grow very large, and use a lot of memory. To address this, one option would be to manually clear them, however I was thinking I might (this will likely not be till October when I get back from holiday) instead provide a setting to have the request logs saved to disk instead, much like the mappings, and then when requests come to retrieve a log entry or a search, parse the files and return the matching ones.
Another scenario I can see this being useful for is where there is a long-running proxy/record instance.
I'm thinking that the RequestLogs collection could be changed into a custom List or IEnumerable implementation, which just stores the request id and filename. When GetEnumerator or other methods are called, it would then read the actual request files from disk and return them.
An alternative option would be to provide a setting such as RequestLogExpirationDuration, or MaxRequestLogCount, which could be used to ensure that request logs are purged when they reach a certain age, or when a certain amount build up. This might be easier, but is another way to address the same issue.
Thoughts Stef?
The text was updated successfully, but these errors were encountered: