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

allows to store stats as a structured object ingame #4

Merged
merged 2 commits into from
Sep 11, 2016

Conversation

thibaut-fagart
Copy link

It allows for less memory usage (no need to duplicate the parent object paths for every stat)

@DissiNL DissiNL merged commit a225c87 into screepers:master Sep 11, 2016
@theCapypara
Copy link

But this doesn't work.
k and v are both undefined. I just noticed this while trying to implement custom server support.

@theCapypara
Copy link

The actual code has to be

  report: (data, prefix="") =>
    if prefix is ''
      console.log "Pushing to gauges - " + new Date()
      for k,v of data
        if typeof v is 'object'
          @report(v, prefix+k+'.')
        else
          @client.gauge prefix+k, v

@thibaut-fagart
Copy link
Author

you're right ... i did a bad copy paste when pushing my change to github (hadn't set up git upstream from my ec2 :( )

@theCapypara
Copy link

It's okay, I was just confused this went unnoticed since September :O

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

Successfully merging this pull request may close these issues.

3 participants