Skip to content
Browse files

add some examples to --help output

  • Loading branch information...
1 parent c838910 commit fda9faed79d5a5eec74d33b85b3bfe971033d89f @tj committed
Showing with 13 additions and 0 deletions.
  1. +13 −0 bin/jog
View
13 bin/jog
@@ -37,6 +37,19 @@ program.on('select', function(val){
selects.push(new Function('_', 'return ' + val));
});
+// examples
+
+program.on('--help', function(){
+ console.log(' Examples:');
+ console.log();
+ console.log(' # filter slow queries');
+ console.log(' $ jog --file query.log --select "_.duration > 300');
+ console.log();
+ console.log(' # total query durations');
+ console.log(' $ jog --file query.log --map _.duration --reduce "$ + _"');
+ console.log();
+});
+
program
.version(jog.version)
.option('-w, --within <ms>', 'filter events to within the given <ms>', ms)

0 comments on commit fda9fae

Please sign in to comment.
Something went wrong with that request. Please try again.