Coder Social home page Coder Social logo

novelty.go's Introduction

Setup

  1. Get your dev environment setup for GAE.
  2. Clone this repository, cd into the directory.
  3. cp app.yaml.example app.yaml
  4. Edit app.yaml with the app name you plan to use.

Running locally

  1. Start the dev server: $ dev_appserver.py .
  2. Seed the server with starting data: $ curl whatever:bees@localhost:8080/yes
  3. Visit localhost:8080 in your browser.

Your novelty server is ready to go. The answer is current set to "yes", and the password for changing the answer is "bees".

To change the answer to "no", simply visit larry:bees@localhost:8080/no

Running tests

  1. Install go.
  2. $ cd basicauth/ && go test

Running on appspot

  1. Follow the registration instuctions for GAE.
  2. Make sure that the app id in app.yaml matches you new app id.
  3. Push the app: $ appcfg.py .
  4. Seed the server with starting data. I'd suggest a different password than "bees": $ curl http://moe:$PASSWORD@$APPID.appspot.com/yes
  5. Visit $APPID.appspot.com in your browser to behold your new novelty server.

Sample Benchmarks

$ ab -n 1000 -c 20 http://$APPID.appspot.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking $APPID.appspot.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Google
Server Hostname:        $APPID.appspot.com
Server Port:            80

Document Path:          /
Document Length:        730 bytes

Concurrency Level:      20
Time taken for tests:   13.121 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      875000 bytes
HTML transferred:       730000 bytes
Requests per second:    76.21 [#/sec] (mean)
Time per request:       262.424 [ms] (mean)
Time per request:       13.121 [ms] (mean, across all concurrent requests)
Transfer rate:          65.12 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       54   66   9.2     63     131
Processing:   125  195  75.5    153     695
Waiting:      124  195  75.4    153     695
Total:        181  261  76.7    223     756

Percentage of the requests served within a certain time (ms)
  50%    223
  66%    269
  75%    316
  80%    332
  90%    388
  95%    412
  98%    437
  99%    446
 100%    756 (longest request)

novelty.go's People

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.