~fginther/unity/raring-search-tests

« back to all changes in this revision

Viewing changes to src/main.vala

  • Committer: Gordon Allott
  • Date: 2009-12-16 13:25:32 UTC
  • mto: This revision was merged to the branch mainline in revision 45.
  • Revision ID: mail@gordallott.com-20091216132532-3zp0dlxqkqjnsmwf
performance logger support and boot chart generation script

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
static int  popup_width  = 1024;
23
23
static int  popup_height = 600;
24
24
static bool show_version = false;
 
25
static string? boot_logging_filename = null;
25
26
 
26
27
const OptionEntry[] options = {
27
28
  {
70
71
    null
71
72
  },
72
73
  {
 
74
    "enable-boot-logging",
 
75
    'b',
 
76
    OptionFlags.FILENAME,
 
77
    OptionArg.FILENAME,
 
78
    ref boot_logging_filename,
 
79
    "show the boobady bah and foo",
 
80
    null
 
81
  },
 
82
  {
73
83
    null
74
84
  }
75
85
};
108
118
      }
109
119
 
110
120
    /* Unique instancing */
 
121
    Unity.TimelineLogger.get_default().start_process ("/Unity");
111
122
    app = new Unity.Application ();
112
123
    if (app.is_running)
113
124
      {
125
136
        
126
137
        return response == Unique.Response.OK ? 0 : 1;
127
138
      }
 
139
    Unity.TimelineLogger.get_default().end_process ("/Unity");
128
140
 
129
141
    /* Things seem to be okay, load the main window */
 
142
    Unity.TimelineLogger.get_default().start_process ("/Unity/Window");
130
143
    window = new Unity.UnderlayWindow (popup_mode, popup_width, popup_height);
131
144
    app.shell = window;
132
 
 
133
145
    window.show ();
 
146
    Unity.TimelineLogger.get_default().end_process ("/Unity/Window");
 
147
    
 
148
    if (boot_logging_filename != null)
 
149
    {
 
150
      Timeout.add_seconds (3, () => {
 
151
        Unity.TimelineLogger.get_default().write_log ("stats.log");
 
152
        return false;
 
153
      });
 
154
    }
134
155
    Gtk.main ();
135
156
 
 
157
    
 
158
    
 
159
 
136
160
    return 0;
137
161
  }
138
162
}