metrics

Java application profiling

对着背影说爱祢 提交于 2019-11-27 14:54:42
问题 I am looking for a Java code profiler which I can use to profile my application (its a service which runs in backend) on production (so means low over head, and it must not slow down my application). Primarily I want calling tree profiling, that is if a() calls b() and then b() calls c(), then how much time a() b() and c() took, both inclusively and exclusively. Have seen jvisualvm and jprofiler , but this is not what I am looking for, because I cannot tie my production application to them as

监控,水平升宿

£可爱£侵袭症+ 提交于 2019-11-27 11:28:53
监控 : 需要先安装 HeapSter 组件 资源指标 :metrics-server 自定义指标 :prometheus k8s-prometheus-adapter 自定义资源定义 开发 apiserver 服务器 资源指标 api 新一代架构 : 核心指标流水线 : 由 kubelet,metrics-server 以及由 API server 提供的 api 组成;提供 cpu 累计使用使用率 , 内存实时使用率, pod 资源的占用率 , 以及容器的磁盘占用率; 监控流水线 : 用于从系统收集各种指标数据并提供终端用户 , 存储 , 系统以及 HPA ,它们包含核心指标以及许多非核心指标,非核心指标不能被 k8s 所解析 metrics-server:API server /apis/metrics.k8s.io/v1beta1 部署 metrics-server 获取核心指标 https://github.com/kubernetes-incubator/metrics-server/tree/master/deploy/1.8%2B git clone https://github.com/kubernetes-incubator/metrics-server.git cd /root/metrics/metrics-server-master/deploy/1.8+

4.Grafana展示监控数据

佐手、 提交于 2019-11-27 10:16:44
Grafana是什么?我们知道Node_export监控服务器状态,但是没有具体的展示,简单来说,Grafana的主要作用就是对监控的数据进行图形化展示。 docker部署 grafana我们这里采用docker方式部署,Docker安装,可参考 Centos7下实现docker + wordpress 安装 1.下载 [root@localhost opt]# docker pull grafana/grafana:latest 2.启动 [root@localhost opt]# docker run \ -d \ -p 3000:3000 \ --name=grafana \ -v /etc/localtime:/etc/localtime:ro \ grafana/grafana 3.浏览器访问 打开浏览器,访问http://192.168.229.139:3000,用户名密码:admin,如下图所示 4.为Grafana添加Prometheus数据源 URL输入服务端地址 5. 创建Dashboard 6.添加CPU使用率图形 Metrics输入 100 - (avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) 7.添加内存使用率图形 Metrics输入 (1 - (node

Recording user data for heatmap with JavaScript

痴心易碎 提交于 2019-11-27 09:59:59
问题 I was wondering how sites such as crazyegg.com store user click data during a session. Obviously there is some underlying script which is storing each clicks data, but how is that data then populated into a database? It seems to me the simple solution would be to send data via AJAX but when you consider that it's almost impossible to get a cross browser page unload function setup, I'm wondering if there is perhaps some other more advanced way of getting metric data. I even saw a site which

Do you find cyclomatic complexity a useful measure?

大兔子大兔子 提交于 2019-11-27 09:50:57
问题 I've been playing around with measuring the cyclomatic complexity of a big code base. Cyclomatic complexity is the number of linearly independent paths through a program's source code and there are lots of free tools for your language of choice. The results are interesting but not surprising. That is, the parts I know to be the hairiest were in fact the most complex (with a rating of > 50). But what I am finding useful is that a concrete "badness" number is assigned to each method as

What code metric(s) convince you that provided code is “crappy”? [closed]

落爺英雄遲暮 提交于 2019-11-27 09:32:45
问题 Code lines per file, methods per class, cyclomatic complexity and so on. Developers resist and workaround most if not all of them! There is a good Joel article on it (no time to find it now). What code metric(s) you recommend for use to automatically identify "crappy code"? What can convince most (you can't convince all of us to some crappy metric! :O) ) of developers that this code is "crap". Only metrics that can be automatically measured counts! 回答1: No metrics regarding coding-style are

mAP metric in object detection and computer vision

余生颓废 提交于 2019-11-27 09:02:38
问题 In computer vision and object detection, the common evaluation method is mAP. What is it and how is it calculated? 回答1: Quotes are from the above mentioned Zisserman paper - 4.2 Evaluation of Results (Page 11): First an "overlap criterion" is defined as an intersection-over-union greater than 0.5. (e.g. if a predicted box satisfies this criterion with respect to a ground-truth box, it is considered a detection). Then a matching is made between the GT boxes and the predicted boxes using this

prometheus-数据展示之grafana部署和数据源配置

余生长醉 提交于 2019-11-27 08:17:30
1、监控pods . prometheus再部署以后,自带cAdvisor。结果如下: 2、K8S集群状态监控。kube-state-metrics部署。部署以后 kubernetes.io/cluster-service: "true" 会自动启用监控对象,无需配置 [root@VM_0_48_centos prometheus]# cat kube-state-metrics-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: kube-state-metrics namespace: kube-system labels: k8s-app: kube-state-metrics kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile version: v1.3.0 spec: selector: matchLabels: k8s-app: kube-state-metrics version: v1.3.0 replicas: 1 template: metadata: labels: k8s-app: kube-state-metrics version: v1.3.0

Why differ metrics calculated by model.evaluate() from tracked metrics during training in Keras?

亡梦爱人 提交于 2019-11-27 08:14:57
问题 I am using Keras 2.0.4 (TensorFlow backend) for an image classification task (based on pretrained models). During training/tuning I track all used metrics (e.g. categorical_accuracy , categorical crossentropy ) with CSVLogger - including the corresponding metrics being associated with the validation set (i.e. val_categorical_accuracy , val_categorical_crossentropy ). With the callback ModelCheckpoint I am tracking the best configuration of weights ( save_best_only=True ). In order to evaluate

Running ANT Programmatically Through Java

元气小坏坏 提交于 2019-11-27 07:29:43
问题 I've a requirement where I have to extract metrics from different Java projects (configured in Eclipse) through Metrics Plugin. I am trying to automate this process using ANT build scripts. I've made a Java utility project that will: Create these build files Put them in respective Java projects configured in Eclipse Attempt to execute them. While the build.xml are running correctly, when I try to run them programmatically, I get the following error: Exception in thread "main" ProjectHelper