Questions tagged [metrics]

Software metrics are quantitative data related to software.

A software metric is an objective and reproducible quantitative measure of some property of the product, its source code, its specification, or the development process that was applied. These can refer to development time metrics such as or runtime metrics such as .

Although the generic term "metrics" is usually used to refer to the latter especially in server-side development. For further information about metrics and their importance in modern software development you can read the seminal work Measure Anything Measure Everything by Ian Malpass.

This tag should be applied to general questions about metrics or questions that span multiple metrics types or implementations or if your are not sure which specific tag applies. For questions specific to a particular metric system more specific tags such as ,, and so forth.

2802 questions
44
votes
8 answers

Codahale Metrics: using @Timed metrics annotation in plain Java

I am trying to add metrics to a plain Java application using codahale metrics. I'd like to use the @Timed annotation, but it is unclear to me which MetricRegistry it uses, or how to tell it which MetricRegistry to use. The application is a plain…
Rolf
  • 7,098
  • 5
  • 38
  • 55
44
votes
1 answer

FnordMetric Toplist Gauges Disappear

What I'm trying to do I'm using FnordMetric Classic through the fnordmetric ruby on rails gem, as shown in Railscasts #378. I would like to have a list of my "popular pages", where a page is a type of content of my web app. Problem Regardless of the…
fiedl
  • 5,667
  • 4
  • 44
  • 57
43
votes
3 answers

how to implement custom metric in keras?

I get this error : sum() got an unexpected keyword argument 'out' when I run this code: import pandas as pd, numpy as np import keras from keras.layers.core import Dense, Activation from keras.models import Sequential def AUC(y_true,y_pred): …
Philippe C
  • 667
  • 2
  • 9
  • 16
40
votes
5 answers

Recording user data for heatmap with JavaScript

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…
Hanpan
  • 10,013
  • 25
  • 77
  • 115
39
votes
3 answers

other open source alternatives to codahale's "metrics"?

I came across the metrics project from codahale, and I believe that it is used at Yammer. I like this solution, but want to know if there are other open source alternatives with similar capabilities.
user2145809
  • 571
  • 2
  • 6
  • 8
39
votes
5 answers

A difference between statement and decision coverage

Statement coverage is said to make sure that every statement in the code is executed at least once. Decision/branch coverage is said to test that each branch/output of a decisions is tested, i.e. all statements in both false/true branches will be…
John V
  • 4,855
  • 15
  • 39
  • 63
37
votes
9 answers

Eclipse metrics plugin suggestion

I'm looking for a tool to give me some code metrics (total LOCs, LOC/Class, # of external references/class, etc...). Does anyone know a good eclipse plugin that could provide me some some code metrics?
Ben S
  • 68,394
  • 30
  • 171
  • 212
36
votes
1 answer

Android layout examples that match "Metrics and Grids" recommendations

After trying to make sense of the Metrics and Grids page of the (fairly new) Android Design website, I gave up on a lot of things. So, basically, I'm trying to find the original layouts that are used in Android 4, so that I can apply the same…
davidcesarino
  • 16,160
  • 16
  • 68
  • 109
36
votes
2 answers

Macro VS Micro VS Weighted VS Samples F1 Score

In sklearn.metrics.f1_score, the f1 score has a parameter called "average". What does macro, micro, weighted, and samples mean? Please elaborate, because in the documentation, it was not explained properly. Or simply answer the following: Why is…
Code Geek
  • 755
  • 2
  • 6
  • 17
36
votes
4 answers

Is sklearn.metrics.mean_squared_error the larger the better (negated)?

In general, the mean_squared_error is the smaller the better. When I am using the sklearn metrics package, it says in the document pages: http://scikit-learn.org/stable/modules/model_evaluation.html All scorer objects follow the convention that…
Edamame
  • 23,718
  • 73
  • 186
  • 320
35
votes
6 answers

How to get screen display metrics in application class

If I put this in some activity class it works perfectly but, when I put it in my App class the method getWindowManager() can not be found. Is there some way to get the WindowManager in app class? My app class is defined like this: public class myApp…
Lukap
  • 31,523
  • 64
  • 157
  • 244
34
votes
22 answers

How to convince your fellow developer to write short methods?

Long methods are evil on several grounds: They're hard to understand They're hard to change They're hard to reuse They're hard to test They have low cohesion They may have high coupling They tend to be overly complex How to convince your…
dfa
  • 114,442
  • 31
  • 189
  • 228
33
votes
4 answers

/actuator/prometheus missing in @SpringbootTest

I'm using springbooot 2.4.0 and I added the following dependencies for enabling prometheus metrics: org.springframework.boot
33
votes
10 answers

Software development metrics and reporting

I've had some interesting conversations recently about software development metrics, in particular how they can be used in a reasonably large organisation to help development teams work better. I know there have been Stack Overflow questions about…
David M
  • 71,481
  • 13
  • 158
  • 186
30
votes
4 answers

Why there are both counters and gauges in Prometheus if gauges can act as counters?

When deciding between Counter and Gauge, Prometheus documentation states that To pick between counter and gauge, there is a simple rule of thumb: if the value can go down, it is a gauge. Counters can only go up (and reset, such as when a…
Jose Armesto
  • 12,794
  • 8
  • 51
  • 56