arm-software / bart Goto Github PK
View Code? Open in Web Editor NEWBehavioural Analysis and Regression Toolkit
License: Apache License 2.0
Behavioural Analysis and Regression Toolkit
License: Apache License 2.0
<ipython-input-27-1629442163bf> in <module>()
1 #a.plot_task_residency(window=(31, 32))
----> 2 a.get_task_period()
/media/kp/kp_hdd/schedtest/libs/utils/analyser.py in get_task_period(self, percent, window, df, plot)
128 columns=["pid", "task_name", "period"]
129
--> 130 result = self._sma.getPeriod(window=window, param="period")
131 if df:
132 result=dframify(result, columns)
/media/kp/kp_hdd/schedtest/libs/bart/bart/sched/SchedMultiAssert.pyc in <lambda>(*args, **kwargs)
181 """A wrapper function to create a dispatch function"""
182
--> 183 return lambda *args, **kwargs: self._dispatch(attr_name, *args, **kwargs)
184
185 def _populate_methods(self):
/media/kp/kp_hdd/schedtest/libs/bart/bart/sched/SchedMultiAssert.pyc in _dispatch(self, func_name, *args, **kwargs)
219
220 attr = getattr(self._asserts[pid], func_name)
--> 221 result[pid][param] = attr(*args, **kwargs)
222
223 if assert_func and result[pid][param]:
/media/kp/kp_hdd/schedtest/libs/bart/bart/sched/SchedAssert.pyc in getPeriod(self, window, align)
463 period = agg.aggregate(level="all", window=window)[0]
464 total, length = map(sum, zip(*period))
--> 465 return (total * 1000) / length
The API reference suggests it should. So marking this one as bug.
I am unable to install BART via pip as it tries using 'README.rst' which does not exist. The error I see is the following:
Collecting BART Downloading bart-0.0.3.tar.gz (266kB) 100% |################################| 276kB 2.3MB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-qBr2fA/BART/setup.py", line 61, in <module> long_description=open("README.rst").read(), IOError: [Errno 2] No such file or directory: 'README.rst'
Documentation created with make -C docs/api_reference html
displays the formula in the documentation using mathjax. However, the formulas don't display properly when uploaded to pythonhosted.org: https://pythonhosted.org/bart-py/bart.sched.SchedAssert.html#bart.sched.SchedAssert.SchedAssert.getDutyCycle
The function reports inaccurate results possibly due to some edge condition not being handled properly
While running a loop like:
for test in range(perf_cnt):
# .... run an experiment and collect the trace ...
run = trappy.Run(trace, scope="sched")
sa = bart.sched.SchedAssert(run, topology, execname='small_10')
dc = sa.getDutyCycle(window=(0,6))
where each time an experiment is executed and the generated trace is parsed to compute the duty cycle of a specified task, sometimes the getDutyCycle() method throws the following exception:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-21-8511dcb12a92> in <module>()
29 run = trappy.Run(trace, scope="sched")
30 sa = SchedAssert(run, topology, execname='small_10')
---> 31 dc = sa.getDutyCycle(window=(0,6))
32
33 # Save results
/home/patbel01/Code/bart/bart/sched/SchedAssert.pyc in getDutyCycle(self, window)
389 """
390
--> 391 return self.getRuntime(window, percent=True)
392
393 def assertDutyCycle(self, expected_value, operator, window):
/home/patbel01/Code/bart/bart/sched/SchedAssert.pyc in getRuntime(self, window, percent)
306
307 agg = self._aggregator(sconf.residency_sum)
--> 308 run_time = agg.aggregate(level="all", window=window)[0]
309
310 if percent:
/home/patbel01/Code/trappy/trappy/stats/Aggregator.pyc in aggregate(self, **kwargs)
149 for node in group[1:]:
150 if self._aggfunc is not None:
--> 151 node_res = self._aggfunc(self._result[node], **kwargs)
152 else:
153 node_res = self._result[node]
/home/patbel01/Code/trappy/trappy/stats/SchedConf.pyc in residency_sum(series, window)
182 "Unexpected Lengths: s_in={}, s_out={}".format(
183 len(s_in),
--> 184 len(s_out)))
185 else:
186 return np.sum(s_out.index.values - s_in.index.values)
RuntimeError: Unexpected Lengths: s_in=5014, s_out=5015
I guess it's an issue related to the "sanitization" of an asymmetry in sched_switch events reported by the trace.
The versioning method that we use for trappy and bart was not optimal. There is no pythonic way of specifying the version of a project, this page describes 7 (seven!) ways of doing it. We were currently using method 5, setting the value in setup.py
and using pkg_resources
to get it from the installed version. This works ok if you have installed the package using python setup.py
or pip
, but fails if you are importing bart from a checkout, which is what lisa do. Even worse, if you import it from lisa but have an old bart version installed, bart.__version__
will tell you the version of the installed bart, not the one you have imported and are using.
We've moved to putting the version in a file in trappy which works a lot better: ARM-software/trappy@712e6f9 . We should implement the same for bart.
About time I added them!
The current reference and select parameters have confusing behaviours when used for boolean and non boolean statements. This needs better documentation and fixing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.