diff --git a/TODO.md b/TODO.md index 9b0b2bc9..a507a694 100644 --- a/TODO.md +++ b/TODO.md @@ -18,6 +18,9 @@ - [ ] Info updates contain other implicit route servers - [ ] Multi-tenant accounts with isolation of subject space - [ ] Add to varz, time for slow consumers, peek or total connections, memory, etc. +- [ ] Add starttime and uptime to connz list. +- [ ] Add in HTTP requests to varz? +- [ ] Add favico and help link for monitoring? - [X] Better user/pass support using bcrypt etc. - [X] SSL/TLS support - [X] Add support for / to point to varz, connz, etc.. diff --git a/hashmap/results.txt b/hashmap/results.txt index 9052348d..8db09dd8 100644 --- a/hashmap/results.txt +++ b/hashmap/results.txt @@ -1,38 +1,52 @@ +2015 iMac 5k 4Ghz i7 +MacOSX 10.11.2 + +==================== +Go version go1.5.2 +==================== + +PASS +Benchmark_GoMap___GetSmallKey-8 300000000 5.06 ns/op 197.63 mops/s +Benchmark_HashMap_GetSmallKey-8 100000000 10.6 ns/op 94.34 mops/s +Benchmark_GoMap____GetMedKey-8 300000000 5.09 ns/op 196.46 mops/s +Benchmark_HashMap__GetMedKey-8 200000000 6.75ns/op 148.15 mops/s +Benchmark_GoMap____GetLrgKey-8 300000000 4.88ns/op 204.91 mops/s +Benchmark_HashMap__GetLrgKey-8 100000000 17.8 ns/op 56.18 mops/s +Benchmark_GoMap_________Set-8 50000000 26.3 ns/op 38.02 mops/s +Benchmark_HashMap_______Set-8 20000000 82.4 ns/op 12.13 mops/s + 2013 MacbookAir 11" i7 1.7Ghz Haswell Linux mint15 3.8.0-19 -================ +==================== Go version go1.2.1 -================ +==================== -Benchmark_GoMap___GetSmallKey 500000000 7.57 ns/op 132.05 mops/s -Benchmark_HashMap_GetSmallKey 100000000 14.30 ns/op 70.08 mops/s -Benchmark_GoMap____GetMedKey 500000000 4.83 ns/op 207.01 mops/s -Benchmark_HashMap__GetMedKey 200000000 9.54 ns/op 104.82 mops/s -Benchmark_GoMap____GetLrgKey 500000000 4.39 ns/op 227.79 mops/s -Benchmark_HashMap__GetLrgKey 100000000 24.50 ns/op 40.77 mops/s +Benchmark_GoMap___GetSmallKey 500000000 7.57 ns/op 132.05 mops/s +Benchmark_HashMap_GetSmallKey 100000000 14.30 ns/op 70.08 mops/s +Benchmark_GoMap____GetMedKey 500000000 4.83 ns/op 207.01 mops/s +Benchmark_HashMap__GetMedKey 200000000 9.54 ns/op 104.82 mops/s +Benchmark_GoMap____GetLrgKey 500000000 4.39 ns/op 227.79 mops/s +Benchmark_HashMap__GetLrgKey 100000000 24.50 ns/op 40.77 mops/s -================ +==================== Go version go1.2.1 -================ +==================== -Benchmark_GoMap___GetSmallKey 200000000 8.77 ns/op 114.02 mops/s -Benchmark_HashMap_GetSmallKey 100000000 14.80 ns/op 67.53 mops/s -Benchmark_GoMap____GetMedKey 500000000 6.21 ns/op 161.05 mops/s -Benchmark_HashMap__GetMedKey 200000000 9.51 ns/op 105.15 mops/s -Benchmark_GoMap____GetLrgKey 100000000 18.30 ns/op 54.68 mops/s -Benchmark_HashMap__GetLrgKey 100000000 24.80 ns/op 40.36 mops/s +Benchmark_GoMap___GetSmallKey 200000000 8.77 ns/op 114.02 mops/s +Benchmark_HashMap_GetSmallKey 100000000 14.80 ns/op 67.53 mops/s +Benchmark_GoMap____GetMedKey 500000000 6.21 ns/op 161.05 mops/s +Benchmark_HashMap__GetMedKey 200000000 9.51 ns/op 105.15 mops/s +Benchmark_GoMap____GetLrgKey 100000000 18.30 ns/op 54.68 mops/s +Benchmark_HashMap__GetLrgKey 100000000 24.80 ns/op 40.36 mops/s -================ +==================== Go version go1.0.3 -================ - -Benchmark_GoMap___GetSmallKey 50000000 52.20 ns/op 19.17 mops/s -Benchmark_HashMap_GetSmallKey 100000000 15.50 ns/op 64.34 mops/s -Benchmark_GoMap____GetMedKey 50000000 61.60 ns/op 16.24 mops/s -Benchmark_HashMap__GetMedKey 200000000 8.91 ns/op 112.20 mops/s -Benchmark_GoMap____GetLrgKey 20000000 86.90 ns/op 11.51 mops/s -Benchmark_HashMap__GetLrgKey 100000000 25.40 ns/op 39.44 mops/s - - +==================== +Benchmark_GoMap___GetSmallKey 50000000 52.20 ns/op 19.17 mops/s +Benchmark_HashMap_GetSmallKey 100000000 15.50 ns/op 64.34 mops/s +Benchmark_GoMap____GetMedKey 50000000 61.60 ns/op 16.24 mops/s +Benchmark_HashMap__GetMedKey 200000000 8.91 ns/op 112.20 mops/s +Benchmark_GoMap____GetLrgKey 20000000 86.90 ns/op 11.51 mops/s +Benchmark_HashMap__GetLrgKey 100000000 25.40 ns/op 39.44 mops/s diff --git a/server/monitor.go b/server/monitor.go index 35d076f4..9c4ba019 100644 --- a/server/monitor.go +++ b/server/monitor.go @@ -309,23 +309,7 @@ func myUptime(d time.Duration) string { // HandleRoot will show basic info and links to others handlers. func (s *Server) HandleRoot(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, ` - - - - - NATS -
- varz
- connz
- routez
- subsz
- - - `) + fmt.Fprintf(w, rootHTML) } // HandleVarz will process HTTP requests for server information. diff --git a/server/roothtml.go b/server/roothtml.go new file mode 100644 index 00000000..fcc5b975 --- /dev/null +++ b/server/roothtml.go @@ -0,0 +1,26 @@ +// Copyright 2016 Apcera Inc. All rights reserved. + +package server + +// Holds the root HTML for our monitoring home page. +var rootHTML = "" + +` + + + + + + NATS +
+ varz
+ connz
+ routez
+ subsz
+
+ help + + +`