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
17
votes
3 answers

Spring Boot Actuator/Micrometer Metrics Disable Some

Is there a way to turn off some of the returned metric values in Actuator/Micrometer? Looking at them now I'm seeing around 1000 and would like to whittle them down to a select few say 100 to actually be sent to our registry.
Joel Holmes
  • 943
  • 2
  • 12
  • 23
17
votes
1 answer

sklearn metrics.log_loss is positive vs. scoring 'neg_log_loss' is negative

Making sure I am getting this right: If we use sklearn.metrics.log_loss standalone, i.e. log_loss(y_true,y_pred), it generates a positive score -- the smaller the score, the better the performance. However, if we use 'neg_log_loss' as a scoring…
Max
  • 385
  • 4
  • 11
17
votes
4 answers

Calculate distance between colors in HSV space

I intend to find a distance metric between two colours in HSV space. Suppose that each colour element has 3 components: hue, saturation, and value. Hue is ranged between 0 to 360, saturation is ranged between 0 to 1, and value is ranged between 0…
user1304846
  • 415
  • 2
  • 5
  • 13
16
votes
2 answers

Calculation of code metrics as-you-type in Visual Studio 2010

I'm looking for extensions that can show code metrics (especially cyclomatic complexity) beside method bodies or in a tool window as I type (without additional interactions). So far I know: Code Metrices by Elisha: free and simple. I don't know…
Matthias
  • 15,919
  • 5
  • 39
  • 84
16
votes
3 answers

How to edit the Configurations of a Helm Chart?

Hi everyone, I have deployed a Kubernetes cluster based on kubeadm and for the purpose of performing HorizontalPodAutoscaling based on the Custom Metrics, I have deployed prometheus-adpater through Helm. Now, i want to edit the configuration for…
16
votes
1 answer

Difference between Codahale metrics and Dropwizard metrics

I'm new to Java. While exploring the ways of monitoring Cassandra, I found out(https://cassandra.apache.org/doc/latest/operating/metrics.html) that "Metrics in Cassandra are managed using the Dropwizard Metrics library". However, at several places…
Vishal Sharma
  • 1,670
  • 20
  • 55
16
votes
2 answers

Using Mercurial, how can I measure individual contributions?

My team is using Mercurial, and I would like to know the relative contributions by each team member. I know that we cannot measure productivity by lines of code, but I would like to see if each person at least contributed something, even if it was…
Paul Gestwicki
  • 1,610
  • 1
  • 15
  • 18
16
votes
4 answers

Why Does This Maintainability Index Increase?

I would be appreciative if someone could explain to me the difference between the following two pieces of code in terms of Visual Studio's Code Metrics rules. Why does the Maintainability Index increase slightly if I don't encapsulate everything…
Timothy
  • 4,630
  • 8
  • 40
  • 68
16
votes
8 answers

Should LOC counting include tests and comments?

While LOC (# lines of code) is a problematic measurement of a code's complexity, it is the most popular one, and when used very carefully, can provide a rough estimate of at least relative complexities of code bases (i.e. if one program is 10KLOC…
Eli Bendersky
  • 263,248
  • 89
  • 350
  • 412
16
votes
2 answers

How to calculate the speedup of a GPU program?

Motivation: I have been tasked with measuring the Karp-Flatt metric and parallel efficiency of my CUDA C code, which requires computation of speedup. In particular, I need to plot all these metrics as a function of the number of processors…
mchen
  • 9,808
  • 17
  • 72
  • 125
15
votes
2 answers

How to interpret code metrics (calculated by SourceMonitor)

After reading the answers to the question "Calculate Code Metrics" I installed the tool SourceMonitor and calculated some metrics. But I have no idea how to interpret them. What's a "good" value for the metric "Percent Branch Statements" "Methods…
Thomas Koschel
  • 3,321
  • 9
  • 33
  • 38
14
votes
3 answers

PHPUnit and C.R.A.P index

I am using php undercontrol and the code browser report some CRAP index error on every setter/getter i.e. code like this public function getFoo() { return $this->_foo; } The getter/setter are covered by the unit testing, the complexity is none…
RageZ
  • 26,800
  • 12
  • 67
  • 76
14
votes
1 answer

Specific software metrics for Clojure programs

We are considering writing a static analyzer to collect software metrics for Clojure code. Of course it will handle the obvious stuff like number of files, functions, parameters per function, etc. I wonder if there are any metrics that are specific…
Maurits Rijk
  • 9,789
  • 2
  • 36
  • 53
14
votes
15 answers

Number of lines of code in a lifetime

One of the companies required from its prospective employee to give the number of lines of code written in the life time in a certain programming language like Java, or C#. Since, most of us have a number of years of experience in different projects…
royalghost
  • 2,773
  • 5
  • 23
  • 29
14
votes
8 answers

SLOC for Java projects

I neeed a free tool to count SLOC on a Java project. I only really need the following metrics: SLOC number of comment lines optionally javadoc metrics optionally sort statistics by file type (.java, .js, .css, .html, .xml, etc) Bonus: 100% Java,…
dfa
  • 114,442
  • 31
  • 189
  • 228