1.0.12 • Published 2 years ago
tlz-profiler v1.0.12
tlz-profiler
- insert profiler after newrelic:
const profiler = require('tlz-profiler').init({
mongoose: require('mongoose'),
sequelize: require('sequelize'),
restDatasource: require('apollo-datasource-rest'),
axios: require('axios'),
express: require('express'),
timers: [[require('lodash'), [['cloneDeep', { resSize: true }]]], require('./src/utils')],
});
- Add profiler plugin to apollo server config
require('tlz-profiler').profiler.timer(rs);
const server = {
plugins: [plugin, require('./src/plugins/logging'), profiler],
};