constructor() {

        // Timestamp when collecting statistics started
        this.startts = Date.now();

        // Name: Should be name of the service provided by this component
        this.name = 'sws';

        // Options
        //this.options = null;

        // Version of this component
        this.version = '';

        // This node hostname
        this.nodehostname = '';

        // Node name: there could be multiple nodes in this service
        this.nodename = '';

        // Node address: there could be multiple nodes in this service
        this.nodeaddress = '';

        // onResponseFinish callback, if specified in options
        this.onResponseFinish = null;

        // If set to true via options, track only API defined in swagger spec
        this.swaggerOnly = false;

        // System statistics
        this.sysStats = new SwsSysStats();

        // Core statistics
        this.coreStats = new SwsCoreStats();

        // Core Egress statistics
        this.coreEgressStats = new SwsCoreStats();

        // Timeline
        this.timeline = new swsTimeline();

        // API Stats
        this.apiStats = new swsAPIStats();

        // Errors
        this.errorsStats = new swsErrors();

        // Last Errors
        this.lastErrors = new swsLastErrors();

        // Longest Requests
        this.longestRequests = new swsLongestRequests();

        // ElasticSearch Emitter
        this.elasticsearchEmitter = new swsElasticsearchEmitter();
    }
Created by sv2 on 2/18/17.
swagger-stats Processor. Processes requests / responses and maintains metrics