Handy load testing code for Google Cloud Endpoints

Now that my app has been submitted and I am awaiting its review, I have time to work on non-critical things like open-sourcing code that I’ve been working on.

I’ve always been a big user and proponent of open source software and have released open source code in the past, but this will be the first code I’ve released for Cromulent Labs. I hope to provide more useful code to the public in the future.

The first project I am releasing is a custom JMeter log parser which can be used to replay Google Cloud Endpoints requests in order to load test an API.

If you’re not familiar with Google Cloud Endpoints, it is a handy extension to Google AppEngine which allows you to define an API on the server-side and it auto-generates the client code for IOS, Android and Javascript. This makes it very easy to create a Service Oriented Architecture, which is all the rage with the kids these days, without having to write your own custom client code to hit the API on the server.

My custom log parser allows you to easily replay logs from an app session in order to stress/load test your API and see if anything breaks. This can be especially useful before you release your client software because while testing by yourself, you probably always hit the same App Engine frontend instance. By loading up enough concurrent JMeter thread groups, you can simulate many more users and test how well your back-end works with a number of different instances running under load at once.

To use the custom log parser, all you need to do is turn on Cloud Endpoints logging on your client. Then create an Access Log Sampler in JMeter and point it at your Endpoints logs for a session. It goes through each API log in order and automatically sets the same URL endpoint, query string, headers and post body for each API call and replays it to your frontend instance. If you want to try it out, there are more detailed steps in the README file for the project which is hosted here on GitHub:

https://github.com/gregggreg/jmeter-custom-components

 

Cliches

It’s 2013, I live in San Francisco, and I’m starting a new company to make iPhone apps. That is quite the cliche.

However, like most startups you hear about these days, I am not trying to get rich and I don’t plan on creating a billion dollar company. I’m not a 24 year old with a once in a lifetime idea convinced he is going to change the world. Instead, I am a grizzled 38 year old software developer and if all goes to plan I will be the only employee my company ever has. I don’t plan on taking any VC money, selling the company to the highest bidder, or going public ever. Hey, you never know, though, things change.

My plan is to create a company which creates useful and fun smartphone apps and if all goes well, perhaps someday those apps will produce enough income that it will pay my bills and be my only job. I am currently still doing some consulting on the side until that day comes, if it ever does.

There has never been another time where it was easier and cheaper to start your own company and so I have taken the plunge. Along the way, I plan on blogging about the experience in case there is anyone out there who will find the journey interesting and/or informative.

Feel free to leave comments, critiques, or insult me along the way.