Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
2a7d2ffc
Commit
2a7d2ffc
authored
Jun 08, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'profiling_in_dev' of
https://github.com/mtanda/grafana
into mtanda-profiling_in_dev
parents
67ad9035
83c76981
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
2 deletions
+33
-2
public/app/core/components/grafana_app.ts
+1
-1
public/app/features/dashboard/dashboardCtrl.js
+8
-0
public/app/features/dashboard/viewStateSrv.js
+7
-0
public/app/features/panel/metrics_panel_ctrl.ts
+0
-1
public/app/features/panel/panel_ctrl.ts
+17
-0
No files found.
public/app/core/components/grafana_app.ts
View file @
2a7d2ffc
...
@@ -17,7 +17,7 @@ export class GrafanaCtrl {
...
@@ -17,7 +17,7 @@ export class GrafanaCtrl {
$scope
.
_
=
_
;
$scope
.
_
=
_
;
$rootScope
.
profilingEnabled
=
store
.
getBool
(
'profilingEnabled'
);
$rootScope
.
profilingEnabled
=
store
.
getBool
(
'profilingEnabled'
)
||
config
.
buildInfo
.
env
===
'development'
;
$rootScope
.
performance
=
{
loadStart
:
new
Date
().
getTime
()
};
$rootScope
.
performance
=
{
loadStart
:
new
Date
().
getTime
()
};
$rootScope
.
appSubUrl
=
config
.
appSubUrl
;
$rootScope
.
appSubUrl
=
config
.
appSubUrl
;
...
...
public/app/features/dashboard/dashboardCtrl.js
View file @
2a7d2ffc
...
@@ -60,6 +60,14 @@ function (angular, $, config, moment) {
...
@@ -60,6 +60,14 @@ function (angular, $, config, moment) {
$scope
.
updateSubmenuVisibility
();
$scope
.
updateSubmenuVisibility
();
$scope
.
setWindowTitleAndTheme
();
$scope
.
setWindowTitleAndTheme
();
if
(
$scope
.
profilingEnabled
)
{
$scope
.
performance
.
panels
=
[];
$scope
.
performance
.
panelCount
=
0
;
$scope
.
dashboard
.
rows
.
forEach
(
function
(
row
)
{
$scope
.
performance
.
panelCount
+=
row
.
panels
.
length
;
});
}
$scope
.
appEvent
(
"dashboard-loaded"
,
$scope
.
dashboard
);
$scope
.
appEvent
(
"dashboard-loaded"
,
$scope
.
dashboard
);
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
if
(
err
.
data
&&
err
.
data
.
message
)
{
err
.
message
=
err
.
data
.
message
;
}
if
(
err
.
data
&&
err
.
data
.
message
)
{
err
.
message
=
err
.
data
.
message
;
}
...
...
public/app/features/dashboard/viewStateSrv.js
View file @
2a7d2ffc
...
@@ -51,6 +51,13 @@ function (angular, _, $) {
...
@@ -51,6 +51,13 @@ function (angular, _, $) {
$scope
.
onAppEvent
(
'panel-initialized'
,
function
(
evt
,
payload
)
{
$scope
.
onAppEvent
(
'panel-initialized'
,
function
(
evt
,
payload
)
{
self
.
registerPanel
(
payload
.
scope
);
self
.
registerPanel
(
payload
.
scope
);
if
(
$scope
.
profilingEnabled
)
{
$scope
.
performance
.
panelsInitialized
++
;
if
(
$scope
.
performance
.
panelsInitialized
===
$scope
.
performance
.
panelCount
)
{
$scope
.
performance
.
allPanelsInitialized
=
new
Date
().
getTime
();
}
}
});
});
this
.
update
(
this
.
getQueryStringState
());
this
.
update
(
this
.
getQueryStringState
());
...
...
public/app/features/panel/metrics_panel_ctrl.ts
View file @
2a7d2ffc
...
@@ -95,7 +95,6 @@ class MetricsPanelCtrl extends PanelCtrl {
...
@@ -95,7 +95,6 @@ class MetricsPanelCtrl extends PanelCtrl {
}
}
setTimeQueryStart
()
{
setTimeQueryStart
()
{
this
.
timing
=
{};
this
.
timing
.
queryStart
=
new
Date
().
getTime
();
this
.
timing
.
queryStart
=
new
Date
().
getTime
();
}
}
...
...
public/app/features/panel/panel_ctrl.ts
View file @
2a7d2ffc
...
@@ -31,6 +31,7 @@ export class PanelCtrl {
...
@@ -31,6 +31,7 @@ export class PanelCtrl {
height
:
any
;
height
:
any
;
containerHeight
:
any
;
containerHeight
:
any
;
events
:
Emitter
;
events
:
Emitter
;
timing
:
any
;
constructor
(
$scope
,
$injector
)
{
constructor
(
$scope
,
$injector
)
{
this
.
$injector
=
$injector
;
this
.
$injector
=
$injector
;
...
@@ -38,6 +39,7 @@ export class PanelCtrl {
...
@@ -38,6 +39,7 @@ export class PanelCtrl {
this
.
$timeout
=
$injector
.
get
(
'$timeout'
);
this
.
$timeout
=
$injector
.
get
(
'$timeout'
);
this
.
editorTabIndex
=
0
;
this
.
editorTabIndex
=
0
;
this
.
events
=
new
Emitter
();
this
.
events
=
new
Emitter
();
this
.
timing
=
{};
var
plugin
=
config
.
panels
[
this
.
panel
.
type
];
var
plugin
=
config
.
panels
[
this
.
panel
.
type
];
if
(
plugin
)
{
if
(
plugin
)
{
...
@@ -58,6 +60,20 @@ export class PanelCtrl {
...
@@ -58,6 +60,20 @@ export class PanelCtrl {
renderingCompleted
()
{
renderingCompleted
()
{
this
.
$scope
.
$root
.
performance
.
panelsRendered
++
;
this
.
$scope
.
$root
.
performance
.
panelsRendered
++
;
this
.
timing
.
renderEnd
=
new
Date
().
getTime
();
if
(
this
.
$scope
.
$root
.
profilingEnabled
)
{
this
.
$scope
.
$root
.
performance
.
panels
.
push
({
panelId
:
this
.
panel
.
id
,
query
:
this
.
timing
.
queryEnd
-
this
.
timing
.
queryStart
,
render
:
this
.
timing
.
renderEnd
-
this
.
timing
.
renderStart
,
});
if
(
this
.
$scope
.
$root
.
performance
.
panelsRendered
===
this
.
$scope
.
$root
.
performance
.
panelCount
)
{
this
.
$scope
.
$root
.
performance
.
allPanelsRendered
=
new
Date
().
getTime
();
var
timeTaken
=
this
.
$scope
.
$root
.
performance
.
allPanelsRendered
-
this
.
$scope
.
$root
.
performance
.
dashboardLoadStart
;
console
.
log
(
"Dashboard::Performance - All panels rendered in "
+
timeTaken
+
" ms"
);
}
}
}
}
refresh
()
{
refresh
()
{
...
@@ -169,6 +185,7 @@ export class PanelCtrl {
...
@@ -169,6 +185,7 @@ export class PanelCtrl {
}
}
this
.
calculatePanelHeight
();
this
.
calculatePanelHeight
();
this
.
timing
.
renderStart
=
new
Date
().
getTime
();
this
.
events
.
emit
(
'render'
,
payload
);
this
.
events
.
emit
(
'render'
,
payload
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment