I have a dateset where I measure curl performance on a set of files from a server. I have stored the entire url as a tag so the data is on this format:
curl,probe=probe10,url="http://example.com/10k.html" download_time=0.01
curl,probe=probe10,url="http://example.com/100k.html" download_time=0.02
curl,probe=probe10,url="http://example.com/1000k.html" download_time=0.1
This works fine for grouping and matching - but displaying is ugly when the entire url is displayed. Is there a way to use map()
or another function where I could extract only filename part of the URL and use as tag?
Perhaps something along these lines?
|> map(fn:(r) => ({ _time:r._time,download:r._value, file: r.url =~ /example.com\/(.+)$/}))