@memlab/core 1.1.18 → 1.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
+ const Config_1 = __importDefault(require("../../lib/Config"));
16
+ const Console_1 = __importDefault(require("../../lib/Console"));
15
17
  const ClusterUtils_1 = __importDefault(require("../ClusterUtils"));
16
18
  // cluster by putting similar traces together
17
19
  class TraceSimilarityStrategy {
@@ -41,6 +43,13 @@ class TraceSimilarityStrategy {
41
43
  // checking new clusters
42
44
  outer: for (let i = 0; i < newTraces.length; ++i) {
43
45
  const traceToCheck = newTraces[i];
46
+ // use an odd number as the divider. If we choose 10 as the divider,
47
+ // when updating the progress indicator, the final digit always ends
48
+ // with a zero, which can appear strange and not representative of
49
+ // the actual progress.
50
+ if (!Config_1.default.isContinuousTest && i % 17 === 0) {
51
+ Console_1.default.overwrite(`clustering trace: ${i} / ${newTraces.length}`);
52
+ }
44
53
  for (let j = 0; j < clusters.length; ++j) {
45
54
  const repTrace = clusters[j][0];
46
55
  if (TraceSimilarityStrategy.isSimilarTrace(repTrace, traceToCheck)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memlab/core",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "license": "MIT",
5
5
  "description": "memlab core libraries",
6
6
  "author": "Liang Gong <lgong@fb.com>",
@@ -0,0 +1,19 @@
1
+ [
2
+ {
3
+ "name": "target",
4
+ "url": "",
5
+ "snapshot": true,
6
+ "screenshot": false,
7
+ "type": "target",
8
+ "idx": 1
9
+ },
10
+ {
11
+ "name": "final",
12
+ "url": "",
13
+ "delay": 10000,
14
+ "snapshot": true,
15
+ "screenshot": false,
16
+ "type": "final",
17
+ "idx": 2
18
+ }
19
+ ]