Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add performance monitoring into data structures #4

Open
mgrosvenor opened this issue Sep 23, 2013 · 0 comments
Open

Add performance monitoring into data structures #4

mgrosvenor opened this issue Sep 23, 2013 · 0 comments

Comments

@mgrosvenor
Copy link
Owner

There are a few ways of doing this.

  1. It should be possible to compile them out.
  2. Simple counters - Number of push, pop, resize ops etc.
  3. Perf mon integration - time taken to do things. Should be added into unit tests if possible.

Idea - Could be generated with a macro that embeds types and a type/name string. This should allow the struct to be generically parsed and printed for nice program output.

make_stats(stats1, ch_word count1; ch_word count2; )

produces

struct {
ch_cstr* stats; //= "ch_word cont1; ch_word count2;"
ch_word count1; ch_word count2;
} stats1;

stats1.stats = "ch_word count1; ch_word_count2;";

which can then be generically interpreted later, by parsing the string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant