[gst-cvs] gstreamer: capsnego: also meassure pipeline building time
Stefan Kost
ensonic at kemper.freedesktop.org
Sun Jun 6 11:24:16 PDT 2010
Module: gstreamer
Branch: master
Commit: 94ed3c370aa49d0430768e52936878458973478e
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=94ed3c370aa49d0430768e52936878458973478e
Author: Stefan Kost <ensonic at users.sf.net>
Date: Sun Jun 6 21:20:21 2010 +0300
capsnego: also meassure pipeline building time
---
tests/benchmarks/capsnego.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/benchmarks/capsnego.c b/tests/benchmarks/capsnego.c
index d76086c..ea560b6 100644
--- a/tests/benchmarks/capsnego.c
+++ b/tests/benchmarks/capsnego.c
@@ -191,10 +191,10 @@ main (gint argc, gchar * argv[])
}
/* build pipeline */
- bin = GST_BIN (gst_pipeline_new ("pipeline"));
-
g_print ("building %s pipeline with depth = %d and children = %d\n",
flavour_str, depth, children);
+ start = gst_util_get_timestamp ();
+ bin = GST_BIN (gst_pipeline_new ("pipeline"));
sink = gst_element_factory_make ("fakesink", NULL);
gst_bin_add (bin, sink);
if (!create_node (bin, sink, &new_sink, children, flavour)) {
@@ -203,7 +203,9 @@ main (gint argc, gchar * argv[])
if (!create_nodes (bin, new_sink, depth, children, flavour)) {
goto Error;
}
- g_print ("built pipeline with %d elements\n", GST_BIN_NUMCHILDREN (bin));
+ end = gst_util_get_timestamp ();
+ g_print ("%" GST_TIME_FORMAT " built pipeline with %d elements\n",
+ GST_TIME_ARGS (end - start), GST_BIN_NUMCHILDREN (bin));
/* meassure */
g_print ("starting pipeline\n");
More information about the Gstreamer-commits
mailing list