Commit Graph

160 Commits (9b4d0cc9a8493c608ab0075ab2c6a2b66061f3be)

Author SHA1 Message Date
Brett 9c712402f3 profiler_v2 seems to be completely functional 2023-10-05 01:48:54 -04:00
Brett ab24a8733b add partial API compatability with profiler v1
the general idea is the same however due to how profiles are handled after calling write or print profile the intervals inside are no longer valid.
(they are deleted and will be removed from the internal hashmap)
print profile is also now consistent with the new API, old calls will need to be updated.
2023-10-05 01:40:36 -04:00
Brett 3266a7b102 fix profiler disable macro 2023-10-05 01:31:54 -04:00
Brett 620c8b9e33 auto_interval, formatting see details for information
auto_interval now accepts an interval_t* which must be created manually. allows for clean RAII
format now switches to seconds after 1000ms instead of after 100ms. This feels more natural
2023-10-05 01:18:47 -04:00
Brett fd3eb73008 profiler_v2 is WIP. seems to work but isn't fully tested 2023-10-04 01:39:43 -04:00
Brett 0bbcb8eeef Merge remote-tracking branch 'github/main' 2023-09-21 23:24:03 -04:00
Brett 029132c622 macro sackro allocator get fuckedero 2023-09-21 23:23:27 -04:00
Brett a438baeca3 fix time returning only extra nanoseconds. function now returns the total nanoseconds sine starting the program
this might be changed in the future
2023-09-17 16:24:53 -04:00
Brett 0b907867a2 argparse get_cast update to work with all is_arithmetic types 2023-09-17 15:22:37 -04:00
Brett 7a07f4a729 rename internal fields away from help to subcommand 2023-09-16 17:50:37 -04:00
Brett 45aeb13dd8 fix SUBCOMMAND action type 2023-09-16 17:49:52 -04:00
Brett 02a1dc1a8c rename help disabler to SUBCOMMAND action type 2023-09-16 17:40:35 -04:00
Brett 9db6dd8456 fix bug with postional args preventing the warning of missing args
add option to print full filename
fix issue with some help printing full filename
2023-09-16 17:22:15 -04:00
Brett 1e293c7dba argparse update
a "janky" solution has been added to the argparse module of BLT.
The new update allows for the creation of "help disablers" which are basically akin to how git operates with
git submodule
git commit
etc
the primary command "git" can have flags (in the case of the tests, --no-color)
while having multiple help disabling sub commands (currently graphics and blt)
everything before the sub command arg will be processed as a primary command flag
everything after the sub command arg will be processed by the sub command arg_parse
this allows for effective namespacing of command modules

TODO:
- Make this as an action?
- cleanup the code
- use a name that makes more sense than "help disabler"
2023-09-16 16:27:48 -04:00
Brett 9e4bfad087 add more features to argparse
can now add git [name] [args] type calls
2023-09-10 15:33:11 -04:00
Brett 215220f98b move defines to c++ 2023-09-07 00:23:13 -04:00
Brett 9348207ffb Add exceptions / assertions
Only works for linux / GNU
2023-08-23 15:23:47 -04:00
Brett e176030868 Merge remote-tracking branch 'github/main' 2023-08-10 02:30:39 -04:00
Brett e68d7aa87f files? 2023-08-10 02:30:09 -04:00
Brett 04fd3aec8b static, nbt, cassert, algoritmn, get exposed
Basically fix a bunch of stuff that came up in production
2023-08-09 21:48:30 -04:00
Brett a44590c195 add pre/postfix to help 2023-08-08 14:08:03 -04:00
Brett 7e05fb3d60 arg parse should be completely functional!
help works
not all functions have been tested!
2023-08-08 14:06:19 -04:00
Brett 4ae730c9bb remove blt::logging from argparse
use std::cout now as it produces more logical outputs
2023-08-07 22:39:25 -04:00
Brett 2a656a687e use new arg parse + defaults now assigned 2023-08-07 17:42:59 -04:00
Brett b083245ab4 partial rewrite on parsing
- will move new one to replace old one in next commit
- basically the same code but works
- args now support arg_data_t as a default
- arg_data_t is now much smarter
2023-08-07 16:12:43 -04:00
Brett e91c915238 fix logging memory errors 2023-08-03 01:48:24 -04:00
Brett 4a3c03dd5e add -vvv support and add some actions + version 2023-08-02 14:00:11 -04:00
Brett c6cb3c59d4 list consume 2023-08-01 13:58:08 -04:00
Brett a0492df393 args 2023-08-01 13:43:00 -04:00
Brett e702a651df parse names 2023-07-31 13:53:10 -04:00
Brett 620a16574d update hashmap to include hash, eq and alloc 2023-07-30 14:04:59 -04:00
Brett 0febd6e8aa arg 2023-07-29 14:04:46 -04:00
Brett 90350e8584 parse 2023-07-29 13:38:19 -04:00
Brett 21425cff55 add parallel hashmaps optional submodule 2023-07-29 02:03:28 -04:00
Brett 7b7d9df67b NBT appears to be completely working 2023-07-28 01:35:01 -04:00
Brett 126faa0b03 NBT working!! 2023-07-27 01:47:11 -04:00
Brett ff1765c52e reader 2023-07-26 14:03:21 -04:00
Brett 7a7ee74924 EVIL HACK 2023-07-26 03:48:09 -04:00
Brett cf7c6f2237 logging NONE will now output without format string 2023-07-25 14:06:04 -04:00
Brett 1998ddbafe update to c++20 2023-07-24 13:00:35 -04:00
Brett c3aab51030 nightly commit + working on NBT 2023-07-24 03:40:09 -04:00
Brett 31855dd0a4 move math functions to math.h
format contained a rounding function and power function, they are now in math.h
2023-07-24 02:44:25 -04:00
Brett b9b501d391 new blt logging works fine! 2023-07-21 16:49:48 -04:00
Brett f5069859c5 Merge remote-tracking branch 'github/main' 2023-07-21 03:56:11 -04:00
Brett 889f24d402 logging 2.0 is almost at first working build 2023-07-21 03:32:42 -04:00
Brett 58ba957b1d working on logging 2.0. Format defined, custom tags added. 2023-07-20 22:38:17 -04:00
Brett 7033474455 memory\!, working on logging! 2023-07-20 21:44:52 -04:00
Brett d883adaf5c Change toString() to str() to better replicate the std 2023-07-10 18:55:20 -04:00
Brett d06c7ebeb6 String buffer 2023-07-10 18:45:43 -04:00
Brett 94624bddec Merge remote-tracking branch 'refs/remotes/tpgc/main' 2023-04-08 12:44:49 -04:00
Brett 5116981057 add prefix to LOG_LEVEL 2023-04-08 12:44:31 -04:00
Paragon-Win a6a2ee966c Fix windows! 2023-04-07 00:02:21 -04:00
Brett 89df343e4f fix most warnings 2023-04-05 17:21:19 -04:00
Brett 409e814815 forgot convert to ms 2023-03-07 18:03:05 -05:00
Brett 13b7c3905b Add total to profiler 2023-03-07 18:02:19 -05:00
Brett b62d4bfe78 update vector and fix profile memory usage 2023-03-06 21:29:04 -05:00
Brett d895e6d033 write profile, histroy count in print-out 2023-03-04 13:07:35 -05:00
Brett 5d493a6493 cleanup printing
remove the needless addition of \n to the end of lines
2023-03-04 11:52:54 -05:00
Brett 643053c409 Ignore negative values by default 2023-03-04 11:46:37 -05:00
Brett 811cdff8d1 refactor profiler
code is now much more clean
	-removed ugly nested loops
	-used functions to reduce code clutter and duplcation
removed redundant functions
cleaned up sort and improved names
2023-03-04 11:42:24 -05:00
Brett b6cf11505b fix missing + 2023-03-03 10:42:38 -05:00
Brett 8592ad6d92 fix memory issue? 2023-03-03 10:41:38 -05:00
Brett cd4e4581ae move math.h to math subdir, update version to 5.0 2023-02-28 23:33:39 -05:00
BuildTools d72441f170 Fix use-after-free issue in the logging library 2023-02-22 01:34:41 -05:00
Brett b95359a311 make read lines throw error on file failure 2023-02-17 23:14:22 -05:00
Brett 7a181e0c71 Add history vector size to readout 2023-02-15 09:50:20 -05:00
Brett 8a1d8dbe04 Add plus to the top seperator in the table formatter 2023-02-14 22:35:40 -05:00
Brett 0aab8d789c Add option to ignore negatives 2023-02-14 22:32:23 -05:00
Brett 70a8e3b2ff Add historical intervals to the profiler print (disabled by default) 2023-02-14 22:28:58 -05:00
Brett ed3dfb3dc3 Introduce scoped intervals 2023-02-14 22:22:48 -05:00
Brett 001b6ae46a Add history to intervals 2023-02-14 22:06:30 -05:00
Brett a196a2aa7d c 2023-02-13 21:48:13 -05:00
Brett 128fc2f9dc Fix system namespace 2023-02-11 12:53:32 -05:00
Brett cf48035378 shader processing 2023-02-08 22:30:20 -05:00
Brett cbc703b852 Cleaned up logging and added file location + line number 2023-02-08 17:22:27 -05:00
Brett 118b39c6f6 dido 2023-02-08 14:21:47 -05:00
Brett 2a5314be57 fix logger creating file when logging to file disabled 2023-02-08 14:21:21 -05:00
Brett f1cb6f05f5 flush 2023-02-08 14:12:21 -05:00
Brett b4548166c3 Finally fully fix logging issue
-buffer size is now calculated
-overflows have been fixed
-temporary buffer is allocated on the heap.
2023-02-08 13:40:28 -05:00
Brett e07b631856 Switch to vector 2023-02-08 13:16:31 -05:00
Brett 54fdeb1ad5 Fix stack dynamic buffer overflow in the logging lib 2023-02-08 13:14:41 -05:00
Brett 3109ec13c0 vectors and matrix 2023-02-07 22:34:10 -05:00
Brett 12a5985916 Push V0.3.2a 2023-01-29 23:36:42 -05:00
Brett 38e6abe4e3 Writing and Reading buffers 2023-01-29 22:27:48 -05:00
Brett 060e1a8efb Tables now have names 2023-01-29 17:10:36 -05:00
Brett 483713b265 tests cleanup, NBT UTF
The UTF8 implementaion is ripped from openjdk-source's java source code, adapted by me for c++
2023-01-29 15:24:33 -05:00
Brett 33b0b7bbbb Cleanup + making way for NBT! 2023-01-27 10:45:18 -05:00
Brett 42b912604d Ordered table pretty print 2023-01-27 09:58:51 -05:00
Brett f68f23ae30 Update 0.3a!
Added table format (TODO: add title to table!)
printing of profiler
ordered table printing to come
TODO: add old table print back, default to table print!
2023-01-27 00:49:44 -05:00
Brett 8ec971f8ce Printing 2023-01-26 12:21:19 -05:00
Brett e58f20d16e Better profiler 2023-01-26 00:59:36 -05:00
Brett bc4bf76be7 Add stream version of the logging macros 2023-01-24 23:01:34 -05:00
Brett 51a1468cf0 Console logging 2023-01-24 17:56:48 -05:00
Brett 6816ddaf7a Logging is now working with all types + formatting
Can provide raw data types like ints, long, float, byte, double etc. Will be printed out as a full line. This cannot be avoided as writing requires the prefix, which cannot be calculated via discrete macro calls. At least not easily.
Performance of the logging needs to be tested
plus writing to filesystem is required.
2023-01-24 15:16:47 -05:00
Brett 5e1deefe48 Add time to the log output 2023-01-23 23:53:37 -05:00
Brett d025b0595c Logging works for the most part, more features need to be added 2023-01-23 17:52:32 -05:00
Brett cf96536468 Logging begin 2023-01-23 10:15:37 -05:00
Brett 30eb1938cc revert 2023-01-17 11:13:25 -05:00
Brett 4269e52e31 Testing pointer nonsense for glut 2023-01-17 11:09:25 -05:00
Brett e2a358ffd1 Basic window class 2023-01-16 14:08:28 -05:00