feat: add pprof api (#1627)

## Rationale
Close https://github.com/apache/horaedb/issues/1577

## Detailed Changes
- In `src/server/src/http.rs`, register the pprof api, similar to the
existing `/debug/profile/heap/{seconds}`.
- In `src/components/profile/src/lib.rs`, implement `dump_heap_pprof`
function, similar to the existing `dump_heap_prof`.

## Test Plan
Manual test. More details are given below.

---------

Co-authored-by: jiacai2050 <dev@liujiacai.net>
13 files changed
tree: b7a3732beb8e52241c0cf27733a2a4ee4c624c96
  1. .github/
  2. docker/
  3. docs/
  4. horaectl/
  5. horaedb/
  6. horaemeta/
  7. integration_tests/
  8. licenses/
  9. scripts/
  10. src/
  11. .asf.yaml
  12. .dockerignore
  13. .gitignore
  14. .gitmodules
  15. .pre-commit-config.yaml
  16. Cargo.lock
  17. Cargo.toml
  18. clippy.toml
  19. CONTRIBUTING.md
  20. DEPENDENCIES.tsv
  21. DISCLAIMER
  22. Dockerfile
  23. LICENSE
  24. licenserc.toml
  25. Makefile
  26. NOTICE
  27. README-CN.md
  28. README.md
  29. rust-toolchain.toml
  30. rustfmt.toml
README.md

HoraeDB

License CI OpenIssue HoraeDB Docker HoraeMeta Docker

中文

Apache HoraeDB (incubating) is a high-performance, distributed, cloud native time-series database.

[!IMPORTANT] Apache HoraeDB (incubating) is an effort undergoing incubation at the Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC.

Please read the DISCLAIMER and a full explanation of “incubating”.

Documentation

Quick Start

Run with Docker

Run HoraeDB standalone Server

docker run -d --name horaedb-server \
  -p 8831:8831 \
  -p 3307:3307 \
  -p 5440:5440 \
  apache/horaedb-server

Run HoraeDB cluster with two horaedb-server node and one horaemeta-server node.

docker compose -f docker/docker-compose.yaml up

Run from source code

Please read the development guide guide for instructions on how to build.

Create Table and Write/Read data

Create Table.

curl --location --request POST 'http://127.0.0.1:5440/sql' \
-d '
CREATE TABLE `demo` (
    `name` string TAG,
    `value` double NOT NULL,
    `t` timestamp NOT NULL,
    timestamp KEY (t))
ENGINE=Analytic
  with
(enable_ttl="false")
'

Write data with SQL.

curl --location --request POST 'http://127.0.0.1:5440/sql' \
-d '
INSERT INTO demo (t, name, value)
    VALUES (1702224000000, "horaedb", 100)
'

Read data with SQL.

curl --location --request POST 'http://127.0.0.1:5440/sql' \
-d '
SELECT * FROM `demo`
'

Drop table.

curl --location --request POST 'http://127.0.0.1:5440/sql' \
-d '
Drop TABLE `demo`
'

Community

Thrive together in Apache HoraeDB (incubating) community with users and developers from all around the world.

  • Ask questions on GitHub Discussion.
  • Chat with developers/users on Discord or DingTalk.
  • Mailing lists are a form of communication used by the Apache community. See guide here to subscribe to our list.

Read our Contributing Guide and make your first contribution!

Acknowledgment

When develop we benefit a lot from several other open source projects, such as influxdb_iox, tikv etc, thanks for their awesome work.

License

Apache License 2.0