Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
mojo20128146ySo i guess ur firs loop was for 0 ... 300? Not 100
Btw what r u storing? I‘m interested in the results and ur setup -
piehole8106y@mojo2012 I fired it in 3 tabs, so that I'd have some concurrent saves... So 0..100 in 3 tabs = 300 overall.
It's a small project to parse POST payload and track it in MongoDB. I'm hoping we'll use it at work, but if not, at least I got to fiddle with some to-me-unknown technologies :) -
mojo20128146yWhats ur average response time and payload size?
I would be curious about the results of 350-500 concurrent requests, thats what I‘m testing my framework right now
I use jmeter btw -
Oh man, I can totally see myself doing this. Minus the kubernetes stuff cuz that's magic to me...
Related Rants
-
rephiscorth38Everyone here ranting about a fucking missing semicolon. I can't remember the last time a missing semicolon wa...
-
CodesNotHot10-Laughed at Gitlab the other day -Accidentally dropped my db today. fuck karma
-
codeclod15When you have a super annoying problem that Google has been unable to help with... But you stumble upon a link...
Yesterday, I was perf testing my small app (my first NodeJS app). I thought I'd do a small, ghetto test: bash forloop with curl and payload to be saved.
My favorite is "for i in {0..100}; do ... ; done". I start firing these bad boys in separate tabs. Everything works fine. I check the DB... Saved results: 303.
I break into sweats. Do I have a race condition? Holy shit, is my DB layer unsafe? Fuck fuck fuck.
I fire the forloop only once. Saved results: 101. FUCK.
I run the for loop for 0..10. Saved results: 11. Huh?
I promptly realize 0..10 runs 11 times. I'm a dumbass.
/Me proceeds to deploy my code to a kubernetes lab instance with https://youtube.com/watch/... playing in the back of my mind.
rant
fuck
i-am-an-idiot
nodejs