[Groonga-commit] groonga/gcs [master] Reduce needless codes

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Nov 12 19:00:49 JST 2012


YUKI Hiroshi	2012-11-12 19:00:49 +0900 (Mon, 12 Nov 2012)

  New Revision: 28bd2f74d3e6feb6f497c51dce27f0dac5c78c5a
  https://github.com/groonga/gcs/commit/28bd2f74d3e6feb6f497c51dce27f0dac5c78c5a

  Log:
    Reduce needless codes

  Modified files:
    tools/scenario-runner.js

  Modified: tools/scenario-runner.js (+4 -8)
===================================================================
--- tools/scenario-runner.js    2012-11-12 18:55:06 +0900 (88ef9df)
+++ tools/scenario-runner.js    2012-11-12 19:00:49 +0900 (6b275f9)
@@ -15,11 +15,11 @@ function Runner(options) {
     this.client.docEndpoint = options.documentEndpoint;
 }
 Runner.prototype = {
-  run: function(scenarios, callback) {
-    if (!Array.isArray(scenarios))
-      this._processScenario(scenarios, callback);
+  run: function(scenario, callback) {
+    if (!Array.isArray(scenario))
+      this._processScenario(scenario, callback);
     else
-      this._processScenarios({ scenarios: scenarios }, callback);
+      this._processScenarios({ scenarios: scenario }, callback);
   },
 
   _processScenarios: function(params, globalCallback) {
@@ -53,14 +53,11 @@ Runner.prototype = {
       scenario.processed = {};
 
     var request = scenario.requests.shift();
-    var results = {};
-
     var self = this;
     function processNext() {
       if (scenario.requests.length) {
         self._processScenario(scenario, callback);
       } else {
-        scenario.results = results;
         var elapsedTime = Date.now() - scenario.start;
         var event = { type: 'scenario:finish',
                       elapsedTime: elapsedTime,
@@ -105,7 +102,6 @@ Runner.prototype = {
       output += '\r\n';
       output += response.Body.toString();
 
-      results[name] = output;
       request.result = output;
       if (self.globalCallback)
         self.globalCallback(null, { type: 'request:finish',
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index