Coder Social home page Coder Social logo

Export Functionality about ali HOT 15 OPEN

nakabonne avatar nakabonne commented on May 17, 2024 1
Export Functionality

from ali.

Comments (15)

nakabonne avatar nakabonne commented on May 17, 2024 2

@lordlycastle There you go. Good idea. Actually I'm looking into the export functionality. But I feel like it's too much to include a set of all requests and their timestamp. I'm guessing writing this summary to a file is enough:
image

from ali.

solarisfire avatar solarisfire commented on May 17, 2024 1

Or InfluxDB... Way more reliable than RRDTool, and can then be grafana'd super easily :-)

from ali.

ghowardMSD avatar ghowardMSD commented on May 17, 2024

I think it should be a time-stamped entry for each attack in a format that can be submitted to RRDTool.

from ali.

nakabonne avatar nakabonne commented on May 17, 2024

@ghowardMSD Okay, you want to plot into external tools, right? Initially, the scope of this tool was just to plot the terminal, so I wasn't considering it. But looks interesting. Because I'm honestly not very familiar with that area, give me a moment to think about it.

from ali.

lordlycastle avatar lordlycastle commented on May 17, 2024

Supporting a propertary format may not be cool. Almost all tools can accept standard formats like CSV (most universal), JSON (newer). This is perfectly tabular data where CSV will be most intuitive.

@nakabonne I believe the raw info would be best like the RAW photos. People can do their own processing. With tools like xsv/jq/fx its simple. Is it too difficult to collect this info? It could write every X sec to disk to reduce memory size for long attacks.

I must say processed data is useful too though. Otherwise you need to do manipulations to compare multiple export results outside of ali. This is difficult 😅

One question is what about requests that returned a different code. This info is important because you might wish to filter only successful/failed/429/5XX requests.

id, start_unix_time, stop_unix_time, http_code would be important. What do you guys think? Can we think something better than unix_time I don't like it as you can't just read it.

from ali.

nakabonne avatar nakabonne commented on May 17, 2024

@lordlycastle

This is perfectly tabular data where CSV will be most intuitive.

Yes, I feel the same way 👍

I believe the raw info would be best like the RAW photos.

I must say processed data is useful too though.

Collecting raw data is a little bit tedious but isn't so difficult. The phrase "processed data" means a kind of like the request latency, right? If so, I'm guessing only processed data is enough like the k6's export feature. Also, as you mentioned, the HTTP status codes should be included, and input data a kind of like the URL and Method as well.

What I'm thinking is:

timestamp,latency,url,method,status_code
1595325560,438000000,http://host.xz,GET,200

I feel like we need to include only the start_time as a timestamp.

from ali.

nakabonne avatar nakabonne commented on May 17, 2024

Can we think something better than unix_time I don't like it as you can't just read it.

I don't know anything that's better than unix_time.

from ali.

lordlycastle avatar lordlycastle commented on May 17, 2024

Maybe we could do ISO format. https://en.wikipedia.org/wiki/ISO_8601

Would make it readable and it’s recognised by most tools easily. Should be able to fetch on all systems easily too regardless of locale and timezone.

Date and time in UTC

  • 2021-03-24T23:12:14+00:00
  • 2021-03-24T23:12:14Z
  • 20210324T231214Z
  • 2021-02-02T15:14:01.9177924Z (common in logs where it needs to be human readable but also parsable) ✅

Decimal points for Milli seconds.

A decimal fraction may be added to the lowest order time element present, in any of these representations. A decimal mark, either a comma or a dot (following ISO 80000-1 according to ISO 8601:1-2019, which does not stipulate a preference except within International Standards, but with a preference for a comma according to ISO 8601:2004) is used as a separator between the time element and its fraction. To denote "14 hours, 30 and one half minutes", do not include a seconds figure. Represent it as "14:30,5", "T1430,5", "14:30.5", or "T1430.5". There is no limit on the number of decimal places for the decimal fraction. However, the number of decimal places needs to be agreed to by the communicating parties. For example, in Microsoft SQL Server, the precision of a decimal fraction is 3, i.e., "yyyy-mm-ddThh:mm:ss[.mmm]".

from ali.

lordlycastle avatar lordlycastle commented on May 17, 2024

Do we need url? Thought that was always fixed for a single run.

Yeah doesn’t matter if you include latency or stop time. One is enough.

from ali.

nakabonne avatar nakabonne commented on May 17, 2024

Looks good. I have no objection to the ISO format for now.

Do we need url?

We don't need it In case that you want to handle only one target once. But for those who want to export results for multiple targets and save them into a single time-series DB, I feel like it would be nice if we have such input data.

I'm in the middle of thinking about this topic but I'm wondering our CSV should be convertible to InfluxDB's line protocol. InfluxDB is one of the most popular time-series DB and this format looks relatively versatile. I mean it's gonna be kind of like:

m,url,method,status_code,value,time
latency,http://host.xz,GET,200,438000000,2020-01-01T00:00:00Z

from ali.

alwaysastudent avatar alwaysastudent commented on May 17, 2024

Right now, I am not even able to copy the metrics from the GUI. Is there a way to report the summary to a file?

from ali.

nakabonne avatar nakabonne commented on May 17, 2024

@alwaysastudent Actually even such a simple summary doesn't exist. I'm looking to support it in the near future, kind of like: #96 (comment)

from ali.

nakabonne avatar nakabonne commented on May 17, 2024

Currently, I'm in the middle of working on implementing the time-series storage layer; once got finished I'm going to support the export functionality, so just a moment.

from ali.

wangzhankun avatar wangzhankun commented on May 17, 2024

Have this feature been supported?

from ali.

ocervell avatar ocervell commented on May 17, 2024

3 years later, is there any progress ? I feel like the tool can be prod-ready only with this feature added, no ?

from ali.

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.