summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-16 16:23:26 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-16 16:23:26 +0000
commit90378e483f36f24d346ead339ee45bf2c0680e5f (patch)
tree18c7f568c0cfbfc8450ad5012fbef6b96e797a69 /c/src
parentAdded code to the macros which checked directive status to also (diff)
downloadrtems-90378e483f36f24d346ead339ee45bf2c0680e5f.tar.bz2
Added BSP_MAXIMUM_OPERATION_COUNT and BSP_ITERATION_COUNT
which allow the BSP to override the default number of objects that will be created in the timing tests. This is useful for reducing memory consumption on small targets. The BSP_ITERATION_COUNT can be used to reduce the number of repititions in some of the tests. This is useful for extremely slow targets (we haven't seen any slow enough to justify modifying this one yet though. :)
Diffstat (limited to 'c/src')
-rw-r--r--c/src/tests/tmtests/include/timesys.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/c/src/tests/tmtests/include/timesys.h b/c/src/tests/tmtests/include/timesys.h
index 40337e9924..8e163ba3fb 100644
--- a/c/src/tests/tmtests/include/timesys.h
+++ b/c/src/tests/tmtests/include/timesys.h
@@ -17,11 +17,36 @@
#include <tmacros.h>
/*
- * How many times a particular operation is performed while timed.
+ * This constant determines the maximum number of a resource
+ * that will be created. For example, some test create multiple
+ * blocking tasks to determine the execution time of blocking
+ * services. By default, the blocking time of 100 tasks will
+ * be measured. Small targets often do not have enough memory
+ * to create 100 tasks. By setting the BSP_MAXIMUM_OPERATION_COUNT
+ * to a lower number (typically 10), all of the time tests can be
+ * run.
*/
-
+
+#ifndef BSP_MAXIMUM_OPERATION_COUNT
#define OPERATION_COUNT 100
+#else
+#define OPERATION_COUNT 100 BSP_MAXIMUM_OPERATION_COUNT
+#endif
+
+/*
+ * Some tests are repeated (iterated) multiple times over
+ * "operation count" operations. For example, a semaphore
+ * test may acquire and release the semaphore "operation count"
+ * times per loop and the body of the loop is repeated "iteration
+ * count" times. This value is a repitition factor which does
+ * not increase memory usage -- only execution time.
+ */
+
+#ifndef BSP_ITERATION_COUNT
#define IT_COUNT 100
+#else
+#define IT_COUNT BSP_ITERATION_COUNT
+#endif
/* functions */