mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #9491 from overleaf/jpa-time-project-creation
[web] collect timing of empty project creation GitOrigin-RevId: d85ef149cff021cff7f164a95513a14413a064cf
This commit is contained in:
parent
add7eeafaf
commit
59429eb3e1
1 changed files with 4 additions and 1 deletions
|
@ -133,6 +133,7 @@ async function _addExampleProjectFiles(ownerId, projectName, project) {
|
|||
|
||||
async function _createBlankProject(ownerId, projectName, attributes = {}) {
|
||||
metrics.inc('project-creation')
|
||||
const timer = new metrics.Timer('project-creation')
|
||||
await ProjectDetailsHandler.promises.validateProjectName(projectName)
|
||||
|
||||
if (!attributes.overleaf) {
|
||||
|
@ -169,7 +170,9 @@ async function _createBlankProject(ownerId, projectName, attributes = {}) {
|
|||
project.rootFolder[0] = rootFolder
|
||||
const user = await User.findById(ownerId, 'ace.spellCheckLanguage')
|
||||
project.spellCheckLanguage = user.ace.spellCheckLanguage
|
||||
return await project.save()
|
||||
await project.save()
|
||||
timer.done()
|
||||
return project
|
||||
}
|
||||
|
||||
async function _createRootDoc(project, ownerId, docLines) {
|
||||
|
|
Loading…
Reference in a new issue