Do not backfill the slug (#3901)
* Do not backfill the slug https://github.com/sitespeedio/sitespeed.io/issues/3899
This commit is contained in:
parent
c098331138
commit
9e215b8b06
|
|
@ -31,9 +31,6 @@ export function resultsStorage(input, timestamp, options) {
|
|||
storageBasePath = resolve('sitespeed-result', ...resultsSubFolders);
|
||||
}
|
||||
|
||||
// backfill the slug
|
||||
options.slug = options.slug || getDomainOrFileName(input).replace(/\./g, '_');
|
||||
|
||||
storagePathPrefix = join(...resultsSubFolders);
|
||||
|
||||
if (resultBaseURL) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ export function send(
|
|||
urlAndGroup[1]
|
||||
];
|
||||
// Avoid having the same annotations twice https://github.com/sitespeedio/sitespeed.io/issues/3277#
|
||||
if (options.slug && options.slug !== urlAndGroup[0]) {
|
||||
if (options.slug) {
|
||||
tags.push(options.slug);
|
||||
}
|
||||
const extraTags = toArray(options.grafana.annotationTag);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ function keyPathFromMessage(message, options, includeQueryParameters, alias) {
|
|||
typeParts.splice(1, 0, toSafeKey(message.group));
|
||||
}
|
||||
|
||||
if (options.graphite && options.graphite.addSlugToKey) {
|
||||
if (options.graphite && options.graphite.addSlugToKey && options.slug) {
|
||||
typeParts.unshift(options.slug);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ export function send(
|
|||
urlAndGroup[0],
|
||||
urlAndGroup[1]
|
||||
];
|
||||
// See https://github.com/sitespeedio/sitespeed.io/issues/3277
|
||||
if (options.slug && options.slug !== urlAndGroup[0]) {
|
||||
|
||||
if (options.slug) {
|
||||
tags.push(options.slug);
|
||||
}
|
||||
const extraTags = toArray(options.graphite.annotationTag);
|
||||
|
|
|
|||
|
|
@ -253,7 +253,9 @@ export class InfluxDBDataGenerator {
|
|||
tags.group = toSafeKey(message.group, options.influxdb.groupSeparator);
|
||||
}
|
||||
|
||||
tags.testName = options.slug;
|
||||
if (options.slug) {
|
||||
tags.testName = options.slug;
|
||||
}
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ export function send(
|
|||
).split('.');
|
||||
let tags = [connectivity, browser, urlAndGroup[0], urlAndGroup[1]];
|
||||
|
||||
// See https://github.com/sitespeedio/sitespeed.io/issues/3277
|
||||
if (options.slug && options.slug !== urlAndGroup[0]) {
|
||||
if (options.slug) {
|
||||
tags.push(options.slug);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -355,5 +355,5 @@ test(`Test influxdb dataGenerator`, t => {
|
|||
const seriesName = data[0].seriesName;
|
||||
const numberOfTags = Object.keys(data[0].tags).length;
|
||||
t.is(seriesName, 'score');
|
||||
t.is(numberOfTags, 7);
|
||||
t.is(numberOfTags, 6);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue