mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Fix benchmarks (#82714)
This commit is contained in:
parent
901e1b1865
commit
69f604f7fa
@ -331,6 +331,7 @@ func setupDB(b testing.TB) benchScenario {
|
|||||||
OrgID: signedInUser.OrgID,
|
OrgID: signedInUser.OrgID,
|
||||||
IsFolder: false,
|
IsFolder: false,
|
||||||
UID: str,
|
UID: str,
|
||||||
|
FolderID: f0.ID,
|
||||||
FolderUID: f0.UID,
|
FolderUID: f0.UID,
|
||||||
Slug: str,
|
Slug: str,
|
||||||
Title: str,
|
Title: str,
|
||||||
@ -358,6 +359,7 @@ func setupDB(b testing.TB) benchScenario {
|
|||||||
OrgID: signedInUser.OrgID,
|
OrgID: signedInUser.OrgID,
|
||||||
IsFolder: false,
|
IsFolder: false,
|
||||||
UID: str,
|
UID: str,
|
||||||
|
FolderID: f1.ID,
|
||||||
FolderUID: f1.UID,
|
FolderUID: f1.UID,
|
||||||
Slug: str,
|
Slug: str,
|
||||||
Title: str,
|
Title: str,
|
||||||
@ -385,6 +387,7 @@ func setupDB(b testing.TB) benchScenario {
|
|||||||
OrgID: signedInUser.OrgID,
|
OrgID: signedInUser.OrgID,
|
||||||
IsFolder: false,
|
IsFolder: false,
|
||||||
UID: str,
|
UID: str,
|
||||||
|
FolderID: f1.ID,
|
||||||
FolderUID: f2.UID,
|
FolderUID: f2.UID,
|
||||||
Slug: str,
|
Slug: str,
|
||||||
Title: str,
|
Title: str,
|
||||||
@ -492,7 +495,7 @@ func setupServer(b testing.TB, sc benchScenario, features featuremgmt.FeatureTog
|
|||||||
}
|
}
|
||||||
|
|
||||||
type f struct {
|
type f struct {
|
||||||
// ID int64 `xorm:"pk autoincr 'id'"`
|
ID int64 `xorm:"pk autoincr 'id'"`
|
||||||
OrgID int64 `xorm:"org_id"`
|
OrgID int64 `xorm:"org_id"`
|
||||||
UID string `xorm:"uid"`
|
UID string `xorm:"uid"`
|
||||||
ParentUID *string `xorm:"parent_uid"`
|
ParentUID *string `xorm:"parent_uid"`
|
||||||
@ -509,8 +512,8 @@ func (f *f) TableName() string {
|
|||||||
|
|
||||||
// SQL bean helper to save tags
|
// SQL bean helper to save tags
|
||||||
type dashboardTag struct {
|
type dashboardTag struct {
|
||||||
ID int64
|
ID int64 `xorm:"pk autoincr 'id'"`
|
||||||
DashboardID int64
|
DashboardID int64 `xorm:"dashboard_id"`
|
||||||
Term string
|
Term string
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,10 +521,10 @@ func addFolder(orgID int64, id int64, uid string, parentUID *string) (*f, *dashb
|
|||||||
now := time.Now()
|
now := time.Now()
|
||||||
title := uid
|
title := uid
|
||||||
f := &f{
|
f := &f{
|
||||||
OrgID: orgID,
|
OrgID: orgID,
|
||||||
UID: uid,
|
UID: uid,
|
||||||
Title: title,
|
Title: title,
|
||||||
// ID: id,
|
ID: id,
|
||||||
Created: now,
|
Created: now,
|
||||||
Updated: now,
|
Updated: now,
|
||||||
ParentUID: parentUID,
|
ParentUID: parentUID,
|
||||||
|
Loading…
Reference in New Issue
Block a user