Revision 18563,
866 bytes
checked in by ghudson, 22 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r18562,
which included commits to RCS files with non-trunk default branches.
|
Rev | Line | |
---|
[18310] | 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, |
---|
[18562] | 23 | bonobo_activation_hostname_get ()); |
---|
[18310] | 24 | |
---|
| 25 | fprintf (stderr, " %g(ms)\n", |
---|
| 26 | g_timer_elapsed (timer, NULL) * 1000.0 / 10); |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | int |
---|
| 30 | main (int argc, char *argv[]) |
---|
| 31 | { |
---|
| 32 | free (malloc (8)); |
---|
| 33 | |
---|
| 34 | timer = g_timer_new (); |
---|
| 35 | g_timer_start (timer); |
---|
| 36 | |
---|
| 37 | add_initial_locales (); |
---|
| 38 | |
---|
| 39 | test_server_info_load (); |
---|
| 40 | |
---|
| 41 | if (g_getenv ("_MEMPROF_SOCKET")) { |
---|
| 42 | g_warning ("Waiting for memprof\n"); |
---|
| 43 | g_main_context_iteration (NULL, TRUE); |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | return 0; |
---|
| 47 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.