[haiku-commits] haiku: hrev49598 - src/tests/misc src/bin build/jam/images/definitions

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 29 Aug 2015 19:16:22 +0200 (CEST)

hrev49598 adds 2 changesets to branch 'master'
old head: 48b2cb377123257347d43438525b04504ce04b68
new head: 5ce7069d156df977c21ff82f557a260d8d9cc5a2
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=5ce7069d156d+%5E48b2cb377123

----------------------------------------------------------------------------

b11eb89c2d4d: Add system_time bin command which just prints system_time().

This can be used by scripts to do verious performance measurements.
Specifically it can be used to measure the boot time since it represents
the uptime.

5ce7069d156d: Add script that prints the uptime after waiting for all servers.

It waits for the message port of each application to become available
using waitfor and then waits for the application to actually reply
using hey. This establishes the criterion of the boot process being
complete as "all servers (and Tracker & Deskbar) are started and
respond to messages".

[ Michael Lotz <mmlr@xxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 54 insertions(+), 1 deletion(-)
build/jam/images/definitions/minimum | 2 +-
src/bin/system_time.cpp | 19 ++++++++++++++++++
src/tests/misc/boot_time_logger.sh | 34 ++++++++++++++++++++++++++++++++

############################################################################

Commit: b11eb89c2d4df40207a9b8e4d7099d356dcc89ec
URL: http://cgit.haiku-os.org/haiku/commit/?id=b11eb89c2d4d
Author: Michael Lotz <mmlr@xxxxxxxx>
Date: Sat Aug 29 17:02:36 2015 UTC

Add system_time bin command which just prints system_time().

This can be used by scripts to do verious performance measurements.
Specifically it can be used to measure the boot time since it represents
the uptime.

----------------------------------------------------------------------------

diff --git a/build/jam/images/definitions/minimum
b/build/jam/images/definitions/minimum
index fa83679..04c2b8d 100644
--- a/build/jam/images/definitions/minimum
+++ b/build/jam/images/definitions/minimum
@@ -26,7 +26,7 @@ SYSTEM_BIN = [ FFilterByBuildFeatures
route
safemode screen_blanker screeninfo screenmode setarch setmime settype
setversion setvolume shutdown
- strace su sysinfo
+ strace su sysinfo system_time
tcptester telnet telnetd top
traceroute trash
unchop unmount
diff --git a/src/bin/system_time.cpp b/src/bin/system_time.cpp
new file mode 100644
index 0000000..128df6b
--- /dev/null
+++ b/src/bin/system_time.cpp
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2015 Haiku, Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ * Authors:
+ * Michael Lotz, mmlr@xxxxxxxx
+ */
+
+#include <OS.h>
+
+#include <stdio.h>
+
+
+int
+main(int argc, char* argv[])
+{
+ printf("%" B_PRIdBIGTIME "\n", system_time());
+ return 0;
+}

############################################################################

Revision: hrev49598
Commit: 5ce7069d156df977c21ff82f557a260d8d9cc5a2
URL: http://cgit.haiku-os.org/haiku/commit/?id=5ce7069d156d
Author: Michael Lotz <mmlr@xxxxxxxx>
Date: Sat Aug 29 17:05:18 2015 UTC

Add script that prints the uptime after waiting for all servers.

It waits for the message port of each application to become available
using waitfor and then waits for the application to actually reply
using hey. This establishes the criterion of the boot process being
complete as "all servers (and Tracker & Deskbar) are started and
respond to messages".

----------------------------------------------------------------------------

diff --git a/src/tests/misc/boot_time_logger.sh
b/src/tests/misc/boot_time_logger.sh
new file mode 100755
index 0000000..f1a88d8
--- /dev/null
+++ b/src/tests/misc/boot_time_logger.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+
+# Send a message to and wait for a reply from all servers to determine when
+# everything's ready.
+SIGNATURES="
+ application/x-vnd.haiku-registrar
+ application/x-vnd.Haiku-mount_server
+ application/x-vnd.Haiku-powermanagement
+ application/x-vnd.Haiku-cddb_daemon
+ application/x-vnd.Haiku-midi_server
+ application/x-vnd.haiku-net_server
+ application/x-vnd.Haiku-debug_server
+ application/x-vnd.Be-PSRV
+ application/x-vnd.haiku-package_daemon
+ application/x-vnd.Haiku-notification_server
+ application/x-vnd.Be-input_server
+ application/x-vnd.Be.media-server
+ application/x-vnd.Be.addon-host
+ application/x-vnd.Be-TRAK
+ application/x-vnd.Be-TSKB"
+
+for SIGNATURE in $SIGNATURES
+do
+ waitfor -m $SIGNATURE
+ hey -s $SIGNATURE get
+ if [ $? -ne 0 ]
+ then
+ echo "Failed to get a reply for $SIGNATURE"
+ exit 1
+ fi
+done
+
+system_time


Other related posts:

  • » [haiku-commits] haiku: hrev49598 - src/tests/misc src/bin build/jam/images/definitions - mmlr