Signed-off-by: [email protected]

diff -uprN power_management_orig/cpu_consolidation.py
power_management/cpu_consolidation.py
--- power_management_orig/cpu_consolidation.py  1969-12-31
18:00:00.000000000 -0600
+++ power_management/cpu_consolidation.py 2009-02-27 17:19:05.000000000
-0600
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+''' This Python script interprets various sched stats values.
+    Validates cpu consolidation for given sched_mc_power_saving value
+'''
+
+import os
+import sys
+LIB_DIR = "%s/testcases/kernel/power_management/lib" %
os.environ['LTPROOT']
+sys.path.append(LIB_DIR)
+from optparse import OptionParser
+from sched_mc import *
+
+__author__ = "Poornima Nayak <[email protected]>"
+
+# Run test based on the command line arguments
+if __name__ == "__main__":
+    usage = "-w"
+    parser = OptionParser(usage)
+    parser.add_option("-w", "--workload", dest="workload",
+        help="Test name that has be triggered")
+    parser.add_option("-l", "--mc_level", dest="mc_level",
+        help="Sched mc power saving value 0/1/2")
+    (options, args) = parser.parse_args()
+
+    try:
+        set_sched_mc_power(options.mc_level)
+     print "INFO: sched mc power saving set to %s" %options.mc_level
+        count_num_cpu()
+        map_cpuid_pkgid()
+        print "INFO: Created table mapping cpu to package"
+        trigger_workld(options.workload)
+        generate_report()
+        validate_cpu_consolidation()
+        sys.exit(0)
+    except:
+        sys.exit(1)


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to