Skip to content
Snippets Groups Projects
Commit e9b2c32d authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Merge branch 'feature/misc-enhancement'

parents 1554b5d4 f41b34ce
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,10 @@ export const MonitorExecutionTime = function (idProperty?: string) { ...@@ -53,7 +53,10 @@ export const MonitorExecutionTime = function (idProperty?: string) {
const start = getMicrosecondsTime() const start = getMicrosecondsTime()
const entities: any[] = await original.apply(this, args) const entities: any[] = await original.apply(this, args)
const duration = getDurationInMicroSeconds(start) const duration = getDurationInMicroSeconds(start)
const k = target.constructor.name + '.' + propertyKey + (idProperty ? `[${(this as any)[idProperty]}]` : '') const k = propertyKey === 'getFromCacheOrDB'
? target.constructor.name + '.<>' + args[0] + '(' + args[1] + ')'
: target.constructor.name + '.' + propertyKey + (idProperty ? `[${(this as any)[idProperty]}]` : '');
// const k = target.constructor.name + '.' + propertyKey + (idProperty ? `[${(this as any)[idProperty]}]` : '')
if (!monitorings[k]) { if (!monitorings[k]) {
monitorings[k] = { monitorings[k] = {
times: [] times: []
......
...@@ -45,7 +45,7 @@ module.exports = (duniterServer, host, port, appParente, program) => co(function ...@@ -45,7 +45,7 @@ module.exports = (duniterServer, host, port, appParente, program) => co(function
}; };
// Confirm started // Confirm started
console.log("module currency-monit started"); console.log(`module currency-monit started at ${new Date()}`);
// Specialized node's UI // Specialized node's UI
let httpServer = webserver(host, port, appParente, duniterServer, monitDatasPath, offset, cache, program.resetData); let httpServer = webserver(host, port, appParente, duniterServer, monitDatasPath, offset, cache, program.resetData);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment