Giter VIP home page Giter VIP logo

Comments (6)

mostafa avatar mostafa commented on September 25, 2024

Hey @daylikon,

k6 supports custom metrics: https://grafana.com/docs/k6/latest/using-k6/metrics/create-custom-metrics/
And with custom metrics, you can also have tags, like this counter metric example: https://grafana.com/docs/k6/latest/javascript-api/k6-metrics/counter/

from xk6-kafka.

daylikon avatar daylikon commented on September 25, 2024

Yes, I can use k6 custom metrics, but I want to use xk6-kafka metric value (kafka_writer_write_seconds/kafka_reader_read_seconds/etc).

Right now writer returns undefined, the difference between the time calculated between writer.produce() is very different from the metric.

Is there a way to get plugin metrics after sending or reading a message, so that they can then be used in custom metrics?

from xk6-kafka.

mostafa avatar mostafa commented on September 25, 2024

@daylikon

I don't think so, unless you export them while the test is running.

from xk6-kafka.

daylikon avatar daylikon commented on September 25, 2024

@mostafa

So I’m thinking about how to export metrics while the test is running. Messages are written in the same topic, but the “name” is different.

Now in the csv and given output plugin, if take the kafka_writer_write_seconds metric, I can compare by topic, but since the payload of the messages is different, I want to aggregate these messages by “name,” but now it’s impossible to do that.

from xk6-kafka.

mostafa avatar mostafa commented on September 25, 2024

@daylikon

Currently only static tags are added to reader and writer metrics based on the metrics provided from the kafka-go module's readerStats and writerStats. You can modify the xk6-kafka's reportReaderStats and reportWriterStats functions to include dynamic tags and try to see if it works the way you expect.

from xk6-kafka.

mostafa avatar mostafa commented on September 25, 2024

@daylikon

Ref: #272 (comment)

from xk6-kafka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.