Revision 18311,
905 bytes
checked in by ghudson, 22 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r18310,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | #include <config.h> |
---|
2 | #include <stdio.h> |
---|
3 | #include <string.h> |
---|
4 | #include <stdlib.h> |
---|
5 | #include <glib.h> |
---|
6 | #include "server.h" |
---|
7 | |
---|
8 | static GTimer *timer; |
---|
9 | |
---|
10 | static void |
---|
11 | test_server_info_load (void) |
---|
12 | { |
---|
13 | int i; |
---|
14 | char *dirs [] = { SERVERINFODIR, NULL }; |
---|
15 | Bonobo_ServerInfoList servers; |
---|
16 | GHashTable *hash = NULL; |
---|
17 | |
---|
18 | fprintf (stderr, "Testing server info load ..."); |
---|
19 | |
---|
20 | g_timer_start (timer); |
---|
21 | for (i = 0; i < 10; i++) |
---|
22 | bonobo_server_info_load (dirs, &servers, &hash, |
---|
23 | bonobo_activation_hostname_get (), |
---|
24 | bonobo_activation_domain_get ()); |
---|
25 | |
---|
26 | fprintf (stderr, " %g(ms)\n", |
---|
27 | g_timer_elapsed (timer, NULL) * 1000.0 / 10); |
---|
28 | } |
---|
29 | |
---|
30 | int |
---|
31 | main (int argc, char *argv[]) |
---|
32 | { |
---|
33 | free (malloc (8)); |
---|
34 | |
---|
35 | timer = g_timer_new (); |
---|
36 | g_timer_start (timer); |
---|
37 | |
---|
38 | add_initial_locales (); |
---|
39 | |
---|
40 | test_server_info_load (); |
---|
41 | |
---|
42 | if (g_getenv ("_MEMPROF_SOCKET")) { |
---|
43 | g_warning ("Waiting for memprof\n"); |
---|
44 | g_main_context_iteration (NULL, TRUE); |
---|
45 | } |
---|
46 | |
---|
47 | return 0; |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.