Skip to content

Commit

Permalink
stats: add bazel for build stats service
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Login <batazor111@gmail.com>
  • Loading branch information
batazor committed Dec 13, 2022
1 parent 19e7aa2 commit 5bc7581
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
31 changes: 30 additions & 1 deletion internal/services/stats/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,33 @@
*.app

# Build
build
build

# Ignore backup files.
*~
# Ignore Vim swap files.
.*.swp
# Ignore files generated by IDEs.
/.aswb/
/.cache/
/.classpath
/.clwb/
/.factorypath
/.idea/
/.ijwb/
/.project
/.settings
/.vscode/
/bazel.iml
# Ignore all bazel-* symlinks. There is no full list since this can change
# based on the name of the directory bazel is cloned into.
/bazel-*
# Ignore outputs generated during Bazel bootstrapping.
/output/
# Ignore jekyll build output.
/production
/.sass-cache
# Bazelisk version file
.bazelversion
# User-specific .bazelrc
user.bazelrc
30 changes: 30 additions & 0 deletions internal/services/stats/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,41 @@

Shortlink stats-server

### Goal

The functional goal of a microservice for saving stats would be to provide a reliable
and efficient way to store and manage data about the usage and performance of a
larger system. This would involve several key tasks, including:

1. Collecting data from various sources within the system, such as logs, metrics,
or other data sources.
2. Storing the data in a secure and organized manner, using a database or other
data storage solution.
3. Providing access to the data through APIs or other interfaces, allowing other
services or applications to retrieve and use the data as needed.
4. Ensuring that the data is accurate and up-to-date, by regularly updating and
maintaining the data storage solution.
5. Providing tools or features for analyzing and visualizing the data, allowing
users to easily understand and interpret the data and make informed decisions based on it.

Overall, the functional goal of a microservice for saving stats would be to provide
a reliable and flexible way to manage and use data about the performance of a larger
system, enabling users to make data-driven decisions and improve the system's
performance over time.

### Build

#### Makefile

```bash
$> mkdir build && cd build
$> conan install ..
$> cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=1 # generates compile_commands.json
$> ln -s compile_commands.json ../compile_commands.json # link compile_commands.json to home dir
```

#### Bazel

```bash
$> bazel build //...
```
Empty file.
7 changes: 6 additions & 1 deletion internal/services/stats/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#include <iostream>

int main(int argc, char** argv) {
// Print hello world
std::cout << "Hello world!" << std::endl;

return 0;
// Return success
return 0;
}

0 comments on commit 5bc7581

Please sign in to comment.