mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #4210 from overleaf/jpa-pdf-caching-5-percent
[misc] pdf caching out of beta with 5%/5% control/treatment split test GitOrigin-RevId: 06a741f56510b866be3380a99304d8ee67f849dd
This commit is contained in:
parent
3414646290
commit
a6cce9d2f6
4 changed files with 12 additions and 38 deletions
|
@ -715,7 +715,7 @@ const ProjectController = {
|
||||||
if (!userId) return cb(null, '')
|
if (!userId) return cb(null, '')
|
||||||
SplitTestHandler.getTestSegmentation(
|
SplitTestHandler.getTestSegmentation(
|
||||||
userId,
|
userId,
|
||||||
'pdf_caching_beta_full',
|
'pdf_caching_5',
|
||||||
(err, segmentation) => {
|
(err, segmentation) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
// Do not fail loading the editor.
|
// Do not fail loading the editor.
|
||||||
|
@ -813,8 +813,7 @@ const ProjectController = {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const canSeeFeaturePreview =
|
const canSeeFeaturePreview =
|
||||||
user.alphaProgram ||
|
user.alphaProgram || pdfCachingFeatureFlag.includes(flag)
|
||||||
(user.betaProgram && pdfCachingFeatureFlag.includes(flag))
|
|
||||||
if (!canSeeFeaturePreview) {
|
if (!canSeeFeaturePreview) {
|
||||||
// The user is not in the target group.
|
// The user is not in the target group.
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -347,16 +347,16 @@ module.exports = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'pdf_caching_beta_full',
|
id: 'pdf_caching_5',
|
||||||
active: process.env.SPLIT_TEST_PDF_CACHING_BETA_ACTIVE === 'true',
|
active: process.env.SPLIT_TEST_PDF_CACHING_5_ACTIVE === 'true',
|
||||||
variants: [
|
variants: [
|
||||||
{
|
{
|
||||||
id: 'collect-metrics-only',
|
id: 'collect-metrics-only',
|
||||||
rolloutPercent: 50,
|
rolloutPercent: 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'collect-metrics-and-enable-caching',
|
id: 'collect-metrics-and-enable-caching',
|
||||||
rolloutPercent: 50,
|
rolloutPercent: 5,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
@ -79,7 +79,7 @@ function submitCompileMetrics(metrics) {
|
||||||
compileTimeServerE2E: timings.compileE2E,
|
compileTimeServerE2E: timings.compileE2E,
|
||||||
}
|
}
|
||||||
sl_console.log('/event/compile-metrics', JSON.stringify(metrics))
|
sl_console.log('/event/compile-metrics', JSON.stringify(metrics))
|
||||||
sendMB('compile-metrics-v3', leanMetrics, SAMPLING_RATE)
|
sendMB('compile-metrics-v4', leanMetrics, SAMPLING_RATE)
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitPDFBandwidth(metrics) {
|
function submitPDFBandwidth(metrics) {
|
||||||
|
@ -91,5 +91,5 @@ function submitPDFBandwidth(metrics) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
sl_console.log('/event/pdf-bandwidth', JSON.stringify(metrics))
|
sl_console.log('/event/pdf-bandwidth', JSON.stringify(metrics))
|
||||||
sendMB('pdf-bandwidth-v3', metricsFlat, SAMPLING_RATE)
|
sendMB('pdf-bandwidth-v4', metricsFlat, SAMPLING_RATE)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1230,11 +1230,6 @@ describe('ProjectController', function () {
|
||||||
this.user.alphaProgram = true
|
this.user.alphaProgram = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function tagBeta() {
|
|
||||||
beforeEach(function () {
|
|
||||||
this.user.betaProgram = true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
this.settings.enablePdfCaching = true
|
this.settings.enablePdfCaching = true
|
||||||
|
@ -1252,13 +1247,9 @@ describe('ProjectController', function () {
|
||||||
tagAlpha()
|
tagAlpha()
|
||||||
expectToCollectMetricsAndCachePDF()
|
expectToCollectMetricsAndCachePDF()
|
||||||
})
|
})
|
||||||
describe('beta user', function () {
|
|
||||||
tagBeta()
|
|
||||||
expectToNotBeEnrolledAtAll()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('during beta roll-out', function () {
|
describe('during regular roll-out', function () {
|
||||||
describe('disabled', function () {
|
describe('disabled', function () {
|
||||||
showNoVariant()
|
showNoVariant()
|
||||||
|
|
||||||
|
@ -1273,17 +1264,13 @@ describe('ProjectController', function () {
|
||||||
tagAlpha()
|
tagAlpha()
|
||||||
expectToCollectMetricsAndCachePDF()
|
expectToCollectMetricsAndCachePDF()
|
||||||
})
|
})
|
||||||
describe('beta user', function () {
|
|
||||||
tagBeta()
|
|
||||||
expectToNotBeEnrolledAtAll()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('variant=collect-metrics', function () {
|
describe('variant=collect-metrics', function () {
|
||||||
showVariant('collect-metrics')
|
showVariant('collect-metrics')
|
||||||
|
|
||||||
describe('regular user', function () {
|
describe('regular user', function () {
|
||||||
expectToNotBeEnrolledAtAll()
|
expectToCollectMetricsOnly()
|
||||||
})
|
})
|
||||||
describe('anonymous user', function () {
|
describe('anonymous user', function () {
|
||||||
tagAnonymous()
|
tagAnonymous()
|
||||||
|
@ -1293,17 +1280,13 @@ describe('ProjectController', function () {
|
||||||
tagAlpha()
|
tagAlpha()
|
||||||
expectToCollectMetricsAndCachePDF()
|
expectToCollectMetricsAndCachePDF()
|
||||||
})
|
})
|
||||||
describe('beta user', function () {
|
|
||||||
tagBeta()
|
|
||||||
expectToCollectMetricsOnly()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('variant=collect-metrics-and-enable-caching', function () {
|
describe('variant=collect-metrics-and-enable-caching', function () {
|
||||||
showVariant('collect-metrics-and-enable-caching')
|
showVariant('collect-metrics-and-enable-caching')
|
||||||
|
|
||||||
describe('regular user', function () {
|
describe('regular user', function () {
|
||||||
expectToNotBeEnrolledAtAll()
|
expectToCollectMetricsAndCachePDF()
|
||||||
})
|
})
|
||||||
describe('anonymous user', function () {
|
describe('anonymous user', function () {
|
||||||
tagAnonymous()
|
tagAnonymous()
|
||||||
|
@ -1313,17 +1296,13 @@ describe('ProjectController', function () {
|
||||||
tagAlpha()
|
tagAlpha()
|
||||||
expectToCollectMetricsAndCachePDF()
|
expectToCollectMetricsAndCachePDF()
|
||||||
})
|
})
|
||||||
describe('beta user', function () {
|
|
||||||
tagBeta()
|
|
||||||
expectToCollectMetricsAndCachePDF()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('variant=enable-caching-only', function () {
|
describe('variant=enable-caching-only', function () {
|
||||||
showVariant('enable-caching-only')
|
showVariant('enable-caching-only')
|
||||||
|
|
||||||
describe('regular user', function () {
|
describe('regular user', function () {
|
||||||
expectToNotBeEnrolledAtAll()
|
expectToCachePDFOnly()
|
||||||
})
|
})
|
||||||
describe('anonymous user', function () {
|
describe('anonymous user', function () {
|
||||||
tagAnonymous()
|
tagAnonymous()
|
||||||
|
@ -1333,10 +1312,6 @@ describe('ProjectController', function () {
|
||||||
tagAlpha()
|
tagAlpha()
|
||||||
expectToCollectMetricsAndCachePDF()
|
expectToCollectMetricsAndCachePDF()
|
||||||
})
|
})
|
||||||
describe('beta user', function () {
|
|
||||||
tagBeta()
|
|
||||||
expectToCachePDFOnly()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue