Code Monkey home page Code Monkey logo

helldivers-client's Introduction

GitHub go.mod Go version GitHub Release Github Container Registry Image Size GitHub Actions Workflow Status

Helldivers 2 Client

Important

Currently in very active development, please don't use unless you are ready for chaos!

Summary

Goal

Storing metrics as historic data for later processing (i.e. visualization)

Procedure

  1. Query the Helldivers 2 API at regular intervals
  2. Write the received data into snapshots, each associated with the current time

Setup

Use the following docker-compose.yaml to get started:

version: '3.8'

networks:
  default:
    driver: bridge

services:
  app:
    image: ghcr.io/stnokott/helldivers-client:latest
    depends_on:
      - api
      - db
    environment:
      POSTGRES_URI: postgresql://root:REPLACEME@db:5432/helldivers  # IMPORTANT: use same credentials as in the <db> container.
      API_URL: http://api:8080
      WORKER_CRON: "*/5 * * * *"  # Cron expression defining how frequent the API is queried. Should be no less than API update interval below. (optional, default is every 5min)
      HEALTHCHECKS_URL: https://hc-ping.com/aaaaaaaa-1111-bbbb-2222-dddddddddddd # healthchecks.io URL. (optional)
      TZ: Europe/Berlin
    networks:
      - default

  api:
    build:
      # Needs to be built from GitHub as there is currently no public Docker image available
      context: https://github.com/helldivers-2/api.git#9c6869c0fa93d41f715fd55b8cce1f11ca257475  # pin version
      dockerfile: ./src/Helldivers-2-API/Dockerfile
    networks:
      - default
    environment:
      Helldivers__API__Authentication__Enabled: false  # Set to true if exposed
      Helldivers__Synchronization__IntervalSeconds: 300  # How frequent the API data is updated.
      Helldivers__Synchronization__DefaultLanguage: en-US  # Language of strings such as Major Order text.

  db:
    image: postgres:16.2
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: REPLACEME
      POSTGRES_DB: helldivers
    volumes:
      - /path/to/persistent/storage:/var/lib/postgresql/data  # Persist your DB data
    networks:
      - default

Development

PGO

We use PGO for build optimization. To collect a new CPU profile from a representative productive environment, do the following:

  1. Run the "Release snapshot" action on your current working branch. This will build and publish a snapshot release of the code on your branch without PGO.

  2. Pull the ghcr.io/stnokott/helldivers-client:latest-snapshot Docker image

  3. Run this image in the same Docker stack as you would do with the regular image. Use the following parameters to control profiling behaviour:

    --pprof-duration=30m -> How long the profiling should run for.

    --pprof-out=default.pprof -> Where to save the generated profile to.

  4. Once finished, commit the newly generated profile file as build/default.pprof to your branch. It will be automatically picked up for the next release.

helldivers-client's People

Contributors

stnokott avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.