Skip to content

Commit

Permalink
Merge 8ef9203 into 4fad23f
Browse files Browse the repository at this point in the history
  • Loading branch information
itayw committed Oct 12, 2014
2 parents 4fad23f + 8ef9203 commit 78b78cf
Show file tree
Hide file tree
Showing 18 changed files with 673 additions and 85 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -38,6 +38,9 @@ We have included a [Vagrant](http://www.vagrantup.com) file to support easy play
# Clone this repository
$ git clone https://github.com/joola/joola
$ cd joola
# Update submodules containing chef recipes
$ git submodule init
$ git submodule update

$ vagrant up
# wait for the box to come online
Expand Down
17 changes: 17 additions & 0 deletions config/default.yml
Expand Up @@ -77,6 +77,8 @@ authentication:
force404: false
#sdk:
# url: https://raw.githubusercontent.com/joola/joola.sdk/feature/%2376/bin/joola.js
query:
fixgmt: false #should be true if server not running in GMT+0
workspaces:
_test:
key: _test
Expand Down Expand Up @@ -177,6 +179,11 @@ workspaces:
type: "metric"
name: "readCount"
key: "readCount"
duration:
datatype: "number"
type: "metric"
name: "duration"
key: "duration"
writes:
key: "writes"
name: "writes"
Expand Down Expand Up @@ -216,6 +223,11 @@ workspaces:
type: "metric"
name: "writeCount"
key: "writeCount"
duration_per_doc:
datatype: "number"
type: "metric"
name: "duration_per_doc"
key: "duration_per_doc"
simple:
key: "simple"
name: "simple"
Expand Down Expand Up @@ -427,6 +439,11 @@ workspaces:
- "metrics:get"
- "metrics:patch"
- "metrics:delete"
- canvases:list
- canvases:add
- canvases:get
- canvases:patch
- canvases:delete
- "roles:list"
- "roles:get"
- "roles:add"
Expand Down
2 changes: 1 addition & 1 deletion lib/common/logger.js
Expand Up @@ -44,7 +44,7 @@ logger.getBuffer = function () {
};

//add the stdout stream
var consoleLevel = joola.config.get('store:logger:console:level') || (process.env.NODE_ENV === 'test' ? 'info' : null) || process.env.JOOLA_CONFIG_STORE_LOGGER_CONSOLE_LEVEL || 'trace';
var consoleLevel = joola.config.get('store:logger:console:level') || (process.env.NODE_ENV === 'test' ? 'trace' : null) || process.env.JOOLA_CONFIG_STORE_LOGGER_CONSOLE_LEVEL || 'trace';

if (process.argv.indexOf('--debug') > -1) {
consoleLevel = 'debug';
Expand Down
7 changes: 4 additions & 3 deletions lib/dispatch/beacon.js
Expand Up @@ -215,11 +215,12 @@ exports.insert = {

return setImmediate(function () {
var end_ts = new Date().getTime();
if (count > 1)
if (count > 1) {
joola.logger.trace('Beacon insert, count: ' + count + ', total: ' + (end_ts - start_ts) + 'ms, rate: ' + (count / (end_ts - start_ts)) + 'doc/ms');

if (workspace != '_stats')
joola.common.stats({event: 'writes', workspace: workspace, username: context.user.username, collection: collection, writeCount: count});
if (workspace != '_stats')
joola.common.stats({event: 'writes', workspace: workspace, username: context.user.username, collection: collection, writeCount: count, duration_per_doc: (count / (end_ts - start_ts))});
}
return callback(null, documents);
});
});
Expand Down

0 comments on commit 78b78cf

Please sign in to comment.