How to use the mem.used function in mem

To help you get started, we’ve selected a few mem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codecentric / spring-boot-admin / spring-boot-admin-server-ui / app / js / controller / apps / detailsCtrl.js View on Github external
.success(function (metrics) {
            $scope.metrics = metrics;
            $scope.metrics['mem.used'] = $scope.metrics.mem - $scope.metrics['mem.free'];

            $scope.gcInfos = {};
            $scope.datasources = {};

            function createOrGet(map, key, factory) {
                return map[key] || (map[key] = factory());
            }

            MetricsHelper.find(metrics, [/gc\.(.+)\.time/, /gc\.(.+)\.count/,
                /datasource\.(.+)\.active/, /datasource\.(.+)\.usage/
            ], [function (metric, match, value) {
                    createOrGet($scope.gcInfos, match[1], function () {
                            return {
                                time: 0,
                                count: 0
                            };
github codecentric / spring-boot-admin / spring-boot-admin-server / src / main / webapp / public / scripts / controllers / controllers.js View on Github external
ApplicationDetails.getMetrics(application).success(function(metrics) {
			$scope.metrics = metrics;
			$scope.metrics["mem.used"] = $scope.metrics["mem"] - $scope.metrics["mem.free"];
  				
			$scope.gcInfos = {};
			$scope.datasources = {}
  				
			function createOrGet(map, key, factory) {
				return map[key] || (map[key] = factory());
			}
  				
			MetricsHelper.find(metrics,
					[ /gc\.(.+)\.time/, /gc\.(.+)\.count/, /datasource\.(.+)\.active/,  /datasource\.(.+)\.usage/ ],
					[ function(metric, match, value) {
						createOrGet($scope.gcInfos, match[1], function() {return {time: 0, count: 0};}).time = value;
					 },
					function(metric, match, value) {
						createOrGet($scope.gcInfos, match[1], function() {return {time: 0, count: 0};}).count = value;
					 },
github Netflix / vector / src / app / processors / utils.spec.js View on Github external
    'sum': slice => ({ '-1': slice['mem.free']['0'] + slice['mem.used']['-1'] }),
    'min': slice => ({ '-1': Math.min(slice['mem.free']['0'], slice['mem.used']['-1']) }),
github VanRoy / spring-cloud-dashboard / src / main / webapp / public / scripts / controllers / controllers.js View on Github external
InstanceDetails.getMetrics(instance).success(function(metrics) {
			$scope.metrics = metrics;
			$scope.metrics["mem.used"] = $scope.metrics["mem"] - $scope.metrics["mem.free"];

			$scope.metrics["systemload.averagepercent"] = $scope.metrics["systemload.average"] / $scope.metrics["processors"] * 100;

			$scope.gcInfos = {};
			$scope.datasources = {};

			function createOrGet(map, key, factory) {
				return map[key] || (map[key] = factory());
			}

			MetricsHelper.find(metrics,
					[ /gc\.(.+)\.time/, /gc\.(.+)\.count/, /datasource\.(.+)\.active/,  /datasource\.(.+)\.usage/ ],
					[ function(metric, match, value) {
						createOrGet($scope.gcInfos, match[1], function() {return {time: 0, count: 0};}).time = value;
					 },
					function(metric, match, value) {
github michael-simons / biking2 / src / main / webapp / public / js / controllers.js View on Github external
$scope.metrics["mem.max"]  = values[0].data['measurements'][0]['value'];
        $scope.metrics["mem.used"] = values[1].data['measurements'][0]['value'];
        $scope.metrics["mem.free"] = values[0].data['measurements'][0]['value'] - values[1].data['measurements'][0]['value'];
        $scope.humanizedUptime = moment.duration(values[2].data['measurements'][0]['value'], 'seconds').humanize();

        var max = 10;
        var cur = $scope.memoryConfig.series[0].data.length;

        if (cur === max) {
            $scope.memoryConfig.series[0].data.splice(0, 1);
            $scope.memoryConfig.series[1].data.splice(0, 1);
            $scope.memoryConfig.xAxis.categories.splice(0, 1);
        }
        $scope.memoryConfig.series[0].data.push(formatKibiBytes($scope.metrics["mem.free"]));
        $scope.memoryConfig.series[1].data.push(formatKibiBytes($scope.metrics["mem.used"]));
        $scope.memoryConfig.xAxis.categories.push($filter('date')(new Date(), "HH:mm:ss"));
    });
    };

mem

Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input

MIT
Latest version published 12 months ago

Package Health Score

64 / 100
Full package analysis