Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Performance Testing

Chris Konstad edited this page Nov 18, 2015 · 5 revisions

Aspects Tested

  • User querying stocks (due Nov. 6th)
  • User favoriting stocks (due Nov. 6th)
  • Critical path (due Nov. 13th)
    • See how vertical scaling helps
    • Test on medium-large DB (~10,000 records)

Goal

  • Test performance of website by having an "average" user do something normal

Prep work

  • call scripts/warm_cache.py to warm up the cache
  • Generate 2,500 user accounts
  • Each account should have ~4 favorites
  • There should be 1 (or a few) stocks that aren't favorited, but cached

Instance Configurations

  • Follow these instructions to keep a consistent testing environment
  • Use this chart to see how many CPUs are available
  • Set ProcessParallelism to be the number of available CPUs
  • Leave each process single threaded
  • Make servers for M3Medium, M3Large, M3XLarge and M32XLarge using our custom SinglePassengerENV.json or MultiPassengerENV.json files
  • If making a load balanced server, have 2 instances running and use the same instance type for the database (db.<instance type chosen for server>).

Script

  • User logs in
  • User visits dashboard
  • User visits dashboard for a stock not favorited
  • User favorites stock
  • User visits dashboard for favorites
    • randomize the order?
  • User unfavorites the stock it favorited during test
  • User logs out

Clean up

  • None

Aspects to Test

User querying stocks

  • Should hit current price, historical prices, and sentiment data (graph)
  • Need to test with cache hits and cache misses

User favoriting stocks

  • Favorite stocks
  • Unfavorite stocks

Critical path

  • User logs in
  • User queries a stock
  • User favorites that stock
  • User queries a favorited stock
  • User unfavorites that stock
  • User logs out
Clone this wiki locally