01: package net.sourceforge.squirrel_sql.client.plugin;
02:
03: /*
04: * Copyright (C) 2003 Colin Bell
05: * colbell@users.sourceforge.net
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation; either
10: * version 2.1 of the License, or (at your option) any later version.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this library; if not, write to the Free Software
19: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: */
21: public class PluginLoadInfo {
22: private IPlugin _plugin;
23: private long _creationStart;
24: private long _creationEnd;
25: private long _startLoading;
26: private long _endLoading;
27: private long _startInitializing;
28: private long _endInitializing;
29:
30: public PluginLoadInfo() {
31: super ();
32: _creationStart = System.currentTimeMillis();
33: }
34:
35: public String getInternalName() {
36: return _plugin.getInternalName();
37: }
38:
39: public long getCreationTime() {
40: return _creationEnd - _creationStart;
41: }
42:
43: public long getLoadTime() {
44: return _endLoading - _startLoading;
45: }
46:
47: public long getInitializeTime() {
48: return _endInitializing - _startInitializing;
49: }
50:
51: void pluginCreated(IPlugin plugin) {
52: _creationEnd = System.currentTimeMillis();
53: _plugin = plugin;
54: }
55:
56: void startLoading() {
57: _startLoading = System.currentTimeMillis();
58: }
59:
60: void endLoading() {
61: _endLoading = System.currentTimeMillis();
62: }
63:
64: void startInitializing() {
65: _startInitializing = System.currentTimeMillis();
66: }
67:
68: void endInitializing() {
69: _endInitializing = System.currentTimeMillis();
70: }
71: }
|