Skip to content

Instantly share code, notes, and snippets.

Avatar

Zachary Tong polyfractal

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am polyfractal on github.
  • I am polyfractal (https://keybase.io/polyfractal) on keybase.
  • I have a public key ASBPje2PPWOEKEtFV006hag1mOZ7HYqck57tn2ImyPTj1go

To claim this, I am signing this object:

View movingstd.js
var alter = require('../lib/alter.js');
var _ = require('lodash');
var Chainable = require('../lib/classes/chainable');
module.exports = new Chainable('movingstd', {
args: [
{
name: 'inputSeries',
types: ['seriesList']
},
{
View skewed.md

I ran a smaller scale test to check if skew affects the system. Test parameters:

  • 10 "nodes"
  • 300 "queries"
  • 5 "metrics
  • 300 hours

Totaling 15,000 time series, 4,500,000 data points total.

Normal Distribution

View Results.md

Ran on my macbook air, half a million docs. Single node, 5 primary 0 replica. Node restarted between runs to make sure all caches cleared, etc.

Existing benchmark

$ python loadtester.py --es "http://localhost:9200/speedtest/_search" -i ../data/stoicism.txt -o test1.txt --ns 10000 --nt 3 --nf 10
0 26004 1.36110687256
1000 5561 0.0182199478149
2000 10516 0.0134048461914
3000 42137 0.0833399295807
4000 34922 0.0168430805206
View boosted_syn.mvel
termInfo = _index[field].get(term,_PAYLOADS);
score = 0;
for (pos : termInfo) {
score = score + pos.payloadAsFloat(0);
}
return score;
View gist:8409633
curl -XPUT "http://localhost:9200/test" -d'
{
"mappings": {
"test" : {
"properties": {
"arrayfield" : {
"type": "string"
}
}
}
View results.txt
./bin/run-all.sh "/usr/share/elasticsearch/bin/elasticsearch -Des.path.conf=/etc/elasticsearch/"
Starting Elasticsearch...
Warming the JVM...
....................done!
------------------------------ Transient Tests ------------------------------
elasticsearch tests
View GuzzleConnection.php
<?php
/**
* Equivalent to performRequest in curlMultiHandleConnection
*/
public function performRequest($method, $uri, $params = null, $body = null)
{
$uri = $this->getURI($uri, $params);
$request = $this->buildGuzzleRequest($method, $uri, $body);
View gist:5506185
public function assertThrowsException($exception, $code)
{
$raisedException = null;
try {
$code();
} catch (\Exception $raisedException) {
// No more code, we only want to catch the exception in $raisedException.
}
$this->assertInstanceOf($exception, $raisedException);
You can’t perform that action at this time.