Chore: Fix benchmarks (#82714)

This commit is contained in:
Sofia Papagiannaki 2024-02-16 10:40:39 +02:00 committed by GitHub
parent 901e1b1865
commit 69f604f7fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -331,6 +331,7 @@ func setupDB(b testing.TB) benchScenario {
OrgID: signedInUser.OrgID,
IsFolder: false,
UID: str,
FolderID: f0.ID,
FolderUID: f0.UID,
Slug: str,
Title: str,
@ -358,6 +359,7 @@ func setupDB(b testing.TB) benchScenario {
OrgID: signedInUser.OrgID,
IsFolder: false,
UID: str,
FolderID: f1.ID,
FolderUID: f1.UID,
Slug: str,
Title: str,
@ -385,6 +387,7 @@ func setupDB(b testing.TB) benchScenario {
OrgID: signedInUser.OrgID,
IsFolder: false,
UID: str,
FolderID: f1.ID,
FolderUID: f2.UID,
Slug: str,
Title: str,
@ -492,7 +495,7 @@ func setupServer(b testing.TB, sc benchScenario, features featuremgmt.FeatureTog
}
type f struct {
// ID int64 `xorm:"pk autoincr 'id'"`
ID int64 `xorm:"pk autoincr 'id'"`
OrgID int64 `xorm:"org_id"`
UID string `xorm:"uid"`
ParentUID *string `xorm:"parent_uid"`
@ -509,8 +512,8 @@ func (f *f) TableName() string {
// SQL bean helper to save tags
type dashboardTag struct {
ID int64
DashboardID int64
ID int64 `xorm:"pk autoincr 'id'"`
DashboardID int64 `xorm:"dashboard_id"`
Term string
}
@ -518,10 +521,10 @@ func addFolder(orgID int64, id int64, uid string, parentUID *string) (*f, *dashb
now := time.Now()
title := uid
f := &f{
OrgID: orgID,
UID: uid,
Title: title,
// ID: id,
OrgID: orgID,
UID: uid,
Title: title,
ID: id,
Created: now,
Updated: now,
ParentUID: parentUID,