Commit graph

1102 commits

Author SHA1 Message Date
mrd0ll4r
2dcb4344cb Merge pull request #336 from mrd0ll4r/xorshift
pkg/prand: replace with pkg/xorshift
2017-06-12 22:09:38 +02:00
Leo Balduf
03b98e0090 pkg/prand: replace with pkg/xorshift 2017-06-12 22:07:05 +02:00
Jimmy Zelinskie
fa6dcddcb6 Merge pull request #335 from jzelinskie/fix-jwt
middleware/jwt: encode infohashes as hex
2017-06-09 00:11:02 -04:00
mrd0ll4r
3a323d9338 Merge pull request #331 from cedricgc/tracker-logic-context
TrackerLogic returns modified Contexts
2017-06-08 17:39:04 +02:00
Jimmy Zelinskie
ad496fceb8 middleware/jwt: encode infohashes as hex
This avoids some corner-cases that can be experienced when trying to
url-escape raw bytes.
2017-06-07 23:07:07 -04:00
Cedric Charly
f7becf952b frontend: TrackerLogic interface returns modified context
HandleAnnounce and HandleScrape must return the modified context changed
by the hooks. These contexts are passed to AfterAnnounce and AfterScrape
for further use.

Closes #304
2017-06-07 19:25:12 -05:00
Jimmy Zelinskie
3168f13b48 Merge pull request #332 from jzelinskie/jwt-escape-infohash
middleware/jwt: escape infohash when debugging
2017-06-06 14:23:26 -04:00
mrd0ll4r
6663c09391 Merge pull request #333 from mrd0ll4r/prom-rules
dist/prometheus: add rules for the storage
2017-06-06 19:58:33 +02:00
Jimmy Zelinskie
389dbd20dc Merge pull request #330 from jzelinskie/helm-flags
dist/helm: default debug and json logs
2017-06-06 13:55:45 -04:00
Leo Balduf
53297853a6 dist/prometheus: add rules for the storage 2017-06-06 19:54:02 +02:00
Jimmy Zelinskie
035c5b4960 middleware/jwt: escape infohash when debugging
Without this, the log lines end up looking like:
request=��1�H�7L a���-��7
2017-06-06 13:22:14 -04:00
Jimmy Zelinskie
6c3ddaefb3 Merge pull request #329 from jzelinskie/debug-jwt
Fix panic on binary start
2017-06-06 12:18:20 -04:00
Jimmy Zelinskie
8dddae0658 dist/helm: sync configs 2017-06-06 12:16:47 -04:00
Jimmy Zelinskie
233b5b52ec dist/helm: default debug and json logs 2017-06-05 22:37:35 -04:00
Jimmy Zelinskie
0d9a2309fc middleware/jwt: add debug logs for JWT failures 2017-06-05 22:09:34 -04:00
Jimmy Zelinskie
dab03f52dc storage: share prometheus models
Running of the binary actually caused a panic due to multiple calling of
MustRegister(). This fixes that by sharing models in the storage
package.
2017-06-05 22:07:13 -04:00
Jimmy Zelinskie
edef032381 Merge pull request #301 from jzelinskie/memorybysubnet
Storage Drivers (starting w/ subnet memory)
2017-06-04 13:47:55 -07:00
Jimmy Zelinskie
ce3281f3e8 example_config.yaml: fix identation from merge 2017-06-04 16:42:32 -04:00
Jimmy Zelinskie
effb05103a cmd/chihaya: remove extra registration of storages 2017-06-04 16:42:32 -04:00
Jimmy Zelinskie
c41519e73f storage: sync memory & memorybysubnet
This change is a manual merge of all of the optimizations that have been
added to the memory peer store into the memorybysubnet peer store.

This also fixes some inconsistencies between the two.
2017-06-04 16:42:32 -04:00
Jimmy Zelinskie
7786e1a915 storage: enforce all peer stores are loggable 2017-06-04 16:06:01 -04:00
Jimmy Zelinskie
ed69a0893e docs/storage: add memorybysubnet 2017-06-04 16:06:01 -04:00
Jimmy Zelinskie
85d7d9c677 storage/memorybysubnet: bench with masks 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
c37311e8c7 cmd/chihaya: register storage drivers 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
acf7e3c749 storage: register unique Prometheus metrics names 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
039f25f571 storage/memorybysubnet: add peerSubnet type 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
b013106f89 storage/memorybysubnet: delete empty subnet buckets 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
cb6a3be2ac storage/memorybysubnet: s/mask/preferredSubnet 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
d07b61d67d storage/memorybysubnet: replace range with len() 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
370004a9f5 storage/memorybysubnet: clarify subnet bits _set_ 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
9ce6c31021 storage/memorysubnet: allocate CIDRMask only once 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
496cc1a31d storage: dynamically register drivers 2017-06-03 15:47:58 -04:00
Jimmy Zelinskie
6fc3f618aa storage/memorybysubnet: add package docs 2017-06-03 15:45:41 -04:00
Jimmy Zelinskie
bd02be6ab5 storage/memorybysubnet: fix TODOs 2017-06-03 15:45:41 -04:00
Jimmy Zelinskie
7f7c79bdf1 storage/memorybysubnet: init 2017-06-03 15:45:41 -04:00
mrd0ll4r
abccf5bd7e Merge pull request #325 from cedricgc/peer-store-config
storage/memory: set default prometheus_reporting_interval
2017-06-03 21:29:11 +02:00
Cedric Charly
ce6706b0d5 storage/memory: set default prometheus_reporting_interval
When left blank in the config, the default prometheus_reporting_interval value
defaulted to 0, causing a panic during peer store initialization. This
change sets the default value to 1 if not provided.

Fixes #319
2017-06-03 14:21:39 -05:00
mrd0ll4r
d3de59bab0 Merge pull request #322 from mrd0ll4r/prom-config
dist/prometheus: add prometheus config and rules
2017-06-03 20:08:28 +02:00
Leo Balduf
7c4f8cf395 dist/helm: move from contrib/helm 2017-06-03 14:14:37 +02:00
Jimmy Zelinskie
ceacd6bdbd Merge pull request #323 from cedricgc/hook-logging
cmd/chihaya: log hook names on startup
2017-06-02 21:12:58 -07:00
Cedric Charly
86197a258c cmd/chihaya: log hook names on startup
Replace logging memory addresses with actual hook names.

Closes #317
2017-06-02 20:56:29 -05:00
Leo Balduf
7fabf4ba61 dist/prometheus: add prometheus config and rules 2017-06-02 19:33:05 +02:00
mrd0ll4r
634bc6b706 Merge pull request #306 from mrd0ll4r/storage-stats
storage: add prometheus metrics for seeders/leechers
2017-05-29 19:11:07 +02:00
Leo Balduf
a70d6dc036 memory: add metrics for peers 2017-05-29 19:04:40 +02:00
mrd0ll4r
1cc0738cbe Merge pull request #316 from mrd0ll4r/remove-time-now
Remove most calls to time.Now
2017-05-17 21:17:49 +02:00
Leo Balduf
143ba54695 storage/memory: remove calls to time.Now() 2017-05-12 20:27:31 +02:00
Leo Balduf
f61e7a9281 frontend: make request timing optional 2017-05-12 20:27:31 +02:00
mrd0ll4r
48abc6048e Merge pull request #315 from mrd0ll4r/fix-config
storage/config: fix example config, add warning for missing shardCount
2017-05-12 20:23:22 +02:00
Leo Balduf
71eb9fb767 storage/config: fix example config, add warning for missing shardCount 2017-05-12 13:16:39 +02:00
Jimmy Zelinskie
a4aeba7ecc Merge pull request #314 from jzelinskie/post-cpu
cmd/chihaya: move cpuprofile into postrun
2017-05-08 14:08:29 -04:00