https://github.com/red-portal/balance-scale
C++ Approximate Scalability Testing Library
https://github.com/red-portal/balance-scale
Last synced: 3 months ago
JSON representation
C++ Approximate Scalability Testing Library
- Host: GitHub
- URL: https://github.com/red-portal/balance-scale
- Owner: Red-Portal
- License: apache-2.0
- Created: 2017-06-28T17:41:18.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-22T09:08:33.000Z (almost 8 years ago)
- Last Synced: 2025-01-18T03:46:02.375Z (5 months ago)
- Language: C++
- Size: 52.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Balance-Scale
## Introduction
Balance-Scale is an algorithm scalibility approximating header-only library.
Based on [Ben Deane's talk at CppCon 2015](https://youtu.be/OPoZWnYIcP4).## How to use
include the 'include' directory.
``` c++
#include
auto calculator = balance::scale-calculator();
auto measurer1 = calculator.make_measurer();
auto measurer2 = calculator.make_measurer();
measurer1.start(N) // N is the size of the algorithm input
/*
algorithm implementation
*/
measurer1.end()measurer2.start(N_2) // N_2 is the size of a different algorithm input
/*
algorithm implementation
*/
measurer2.end()
auto result = calculator.compute_complexity();
```Make a measurer and measure the blocks of your algorithms with varying input sizes.
In order to compute the scalability, you should measure with at least two measurer objects.
The calculator object retrieves all the measurers' datas automatically and returns the closest complexity.## TODO
active development under process. This library is subject to very frequent update and change of interface.## License
Copyright 2017 Red-Portal
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.