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
8
votes
1 answer

Spark metrics on wordcount example

I read the section Metrics on spark website. I wish to try it on the wordcount example, I can't make it work. spark/conf/metrics.properties : # Enable CsvSink for all instances *.sink.csv.class=org.apache.spark.metrics.sink.CsvSink # Polling period…
GermainGum
  • 1,349
  • 3
  • 15
  • 40
8
votes
2 answers

How to show Dropwizard Metrics Servlet with spring-boot?

I'm using spring-boot-starter-actuator for getting a localhost/metrics endpoint. Now I also want to use the dropwizard.metrics and the metrics-servlets dependency. On their webpage (https://dropwizard.github.io/metrics/3.1.0/getting-started/) it is…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
8
votes
2 answers

What kind-of stats does your company collect to define code / software product quality

Most programming houses / managers i know of can only define quality in terms of the no of bugs made / resolved in retrospect. However most good programmers can innately sense quality once they start meddling with the code.(right?) Has any…
computinglife
  • 4,321
  • 1
  • 21
  • 18
8
votes
2 answers

SonarQube - is Condition coverage actually the branch coverage?

SonarQube describes the "Condition" coverage like this: On each line of code containing some boolean expressions, the condition coverage simply answers the following question: 'Has each boolean expression been evaluated both to true and false?'.…
Pietross
  • 313
  • 1
  • 3
  • 9
8
votes
3 answers

Are there code metrics that will cover variable scoping

In trying to get an overview of how difficult some legacy C++ and C# code is to maintain, and the risk of introducing bugs to it, it has been suggested that it would be useful to measure how widely or narrowly variables are scoped. The code uses a…
krm
  • 81
  • 2
8
votes
1 answer

How I can know how many methods a class has, using IntelliJ IDEA?

I am using IntelliJ IDEA. How I can know how many methods a class has? Are there any plugins to see metrics concerning the number of methods?
Miuler
  • 473
  • 1
  • 5
  • 13
7
votes
11 answers

Does bitrot have any accepted dimensions?

Every modern source control system can slice and dice the history of a program. There are many tools to statically and dynamically analyze code. What sort of mathematical formula would allow me to integrate the amount of activity in a file along…
ojblass
  • 21,146
  • 22
  • 83
  • 132
7
votes
1 answer

disable wal replay on crash for prometheus

Is there a way to disable WAL replay on crash for Prometheus? It takes a while for a pod to come back up due to WAL replay: We can afford to lose some metrics if it meant faster recovery after the crash. level=info ts=2021-04-22T20:13:42.568Z…
Steve
  • 863
  • 3
  • 9
  • 21
7
votes
0 answers

String interpolation with the name of metric in the Datadog query

There are a bunch of custom metrics that looks like: metric.name.key1 metric.name.key2 ... There is a template variables dropdown (https://docs.datadoghq.com/dashboards/template_variables/) on the dashboard that contains all keys. (Name of the…
Ihor Rybak
  • 3,091
  • 2
  • 25
  • 32
7
votes
1 answer

How to alert on metrics with a high cardinality in prometheus

when trying to create an alert on high metric cardinality with the expression count by(__name__) ({__name__=~".+"}) > 50 I get the error: vector contains metrics with the same labelset after applying rule labels. As the expression works when using…
7
votes
1 answer

What's difference between using metrics 'acc' and tf.keras.metrics.Accuracy()

When calling a model's compile method, we can pass in metrics. Why is tf.keras.metrics.Accuracy different than 'acc'? For example, the following 2 calls give different…
user3731622
  • 4,844
  • 8
  • 45
  • 84
7
votes
1 answer

How to divide two Prometheus Counters

I have two metrics, Counters to be precise, lets say they are called NumberOfVisitors NumberOfLogins In grafana I would like to plot is the number-of-logins divided by the number of visitors (or the other way around) over time. So I…
Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333
7
votes
1 answer

Is there a way to capture the Micrometer @Timed annotation into the Prometheus metrics store/registry?

I want to capture the data from Micrometer's @Timed annotation into the Prometheus metrics store/registry. I can't find any explanations on how to do this online. These are the versions I am using: compile…
G Lor
  • 205
  • 2
  • 3
  • 10
7
votes
1 answer

What are the 'hiq' and 'siq' fields in dstat cpu output

dstat CPU metrics have two fields named hiq and siq. What do these fields represent? Are they some sort of hardware interrupts and software interrupts?
superselector
  • 3,007
  • 3
  • 19
  • 10
7
votes
1 answer

How do masked values affect the metrics in Keras?

If I look into keras metric I see that the values of y_true and y_predict are "just" compared at the end of each epoch for categorical_accuracy: def categorical_accuracy(y_true, y_pred): return K.cast(K.equal(K.argmax(y_true, axis=-1), …
Florida Man
  • 2,021
  • 3
  • 25
  • 43