Closed hem-brahmbhatt closed 7 years ago
When wrapping calls to memoizee in a module, the profile records all calls under a single bucket for the module.
------------------------------------------------------------ Memoize statistics: Init Cache %Cache Source location 17 12 41.38 (all) 17 12 41.38 at cache (/Users/test/Projects/test/src/data/cache.js:14:10) ------------------------------------------------------------
Having a parameter to specify to name the bucket would be useful.
memProfile = require('memoizee/profile'); memoized = memoize(fn, { name: "My bucket" }); console.log(memProfile.log()); ------------------------------------------------------------ Memoize statistics: Init Cache %Cache Name 17 12 41.38 (all) 17 12 41.38 My bucket ------------------------------------------------------------
Wrappers could then pass this through to memoizee and can be used instead of the source location.
Ok, so some profileName option, to replace location of initialization.
profileName
Good proposal, I'll keep it in the backlog. Thanks
When wrapping calls to memoizee in a module, the profile records all calls under a single bucket for the module.
Having a parameter to specify to name the bucket would be useful.
Wrappers could then pass this through to memoizee and can be used instead of the source location.