@standardnotes/analytics
Advanced tools
Comparing version 1.12.0 to 1.12.1
@@ -17,10 +17,4 @@ "use strict"; | ||
const periodKeys = this.periodKeyGenerator.getDiscretePeriodKeys(Period_1.Period.Last30Days); | ||
let previousPeriodKey = periodKeys[0]; | ||
let intersectionPeriodKey = null; | ||
for (let i = 0; i < periodKeys.length - 1; i++) { | ||
intersectionPeriodKey = `${periodKeys[0]}-iteration-${i}`; | ||
await this.redisClient.bitop('AND', `bitmap:action:${activity}:timespan:${intersectionPeriodKey}`, `bitmap:action:${activity}:timespan:${previousPeriodKey}`, `bitmap:action:${activity}:timespan:${periodKeys[i + 1]}`); | ||
previousPeriodKey = intersectionPeriodKey; | ||
} | ||
return this.redisClient.bitcount(`bitmap:action:${activity}:timespan:${intersectionPeriodKey}`); | ||
await this.redisClient.bitop('AND', `bitmap:action:${activity}:timespan:${periodKeys[0]}-${periodKeys[periodKeys.length - 1]}`, ...periodKeys.map((p) => `bitmap:action:${activity}:timespan:${p}`)); | ||
return this.redisClient.bitcount(`bitmap:action:${activity}:timespan:${periodKeys[0]}-${periodKeys[periodKeys.length - 1]}`); | ||
} | ||
@@ -27,0 +21,0 @@ async calculateActivityChangesTotalCount(activity, period) { |
{ | ||
"name": "@standardnotes/analytics", | ||
"version": "1.12.0", | ||
"version": "1.12.1", | ||
"engines": { | ||
@@ -40,3 +40,3 @@ "node": ">=14.0.0 <17.0.0" | ||
}, | ||
"gitHead": "becb386d1012b9fd33fbb143614497f899cfc10e" | ||
"gitHead": "f8334cf9d255a71c30eea2444adcb65c64633280" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56608
436