open-index/open-npm huggingface dataset:
npm package: @muta-extra/apm
Description: ## Prometheus Metrics(Sync)
Latest version: 0.4.0-dev.17

# APM

## Prometheus Metrics(Sync)

### muta_sync_fetch_count

A `Gauge` for counting the fetched resource from muta node

### muta_sync_remote_height

A `Gauge` for record the connected muta node height

### muta_sync_local_height

A `Gauge` for record synced height

### muta_sync_fetch_seconds

A `Counter` for time spent on sync

### muta_sync_save_seconds

A `Count` for time spent on saving the data
npm package: @muta-extra/app-server
Description: A runnable module that provides GraphQL API service.
Latest version: 0.4.0-dev.17

# @muta-extra/app-server

A runnable module that provides GraphQL API service.

## Quick Start

```
npm install -g @muta-extra/app-server
export HERMIT_DATABASE_URL=mysql://user@passwordlocalhost:3306/muta
muta-extra-server
```
npm package: @muta-extra/knex-mysql
Description: Provide a default database layer implemented by MySQL with knex.
Latest version: 0.4.0-dev.17

# @muta-extra/knex-mysql

Provide a default database layer implemented by MySQL with knex.

## First Step

### Install

```
npm install -g @muta-extra/knex-mysql
```

### Set Environment Variables

Create a `.env` file like this.

```
HERMIT_DATABASE_URL=mysql://username:password@localhost:3306/muta
```

Or use environment variables directly. Warning for Windows user, we need to use `SET HERMIT_DATABASE_URL=mysql://...` to set variable environments.

###Migration

```
muta-extra-knex-mysql run migrate:up
```

### Rollback

```
muta-extra-knex-mysql run migrate:down
```

## Environment Variables

### HERMIT_DATABASE_URL

A mysql connection url, like `mysql://username:password@localhost:3306/muta`

- type: string
- required: true

### HERMIT_CACHE_URL

A redis connection url like `redis://user:secret@localhost:6379/0?foo=bar&qux=baz`,
checkout [INAN](http://www.iana.org/assignments/uri-schemes/prov/redis) for more information

- type: string
- required: false

## Links

- [SQL schema](./docs/schema.sql)
npm package: @muta-extra/synchronizer
Description: Providing the default synchronizer for Muta instance.
Latest version: 0.4.0-dev.17

# @muta-extra/synchronizer

Providing the default synchronizer for Muta instance.

## Environment Variables

### HERMIT_FETCH_CONCURRENCY

Maximum number of concurrent **requests**

- type: number
- default: 20

### HERMIT_MAX_PREFETCH_SIZE

Maximum number of concurrent requests for **blocks**

- type: number
- default: 5

## Programming Usage

```ts
import {
  ISynchronizerAdapter,
  PollingSynchronizer,
} from '@muta-extra/synchronizer';

export function sync() {
  const myAdapter: ISynchronizerAdapter = {
    // ...
  };
  return new PollingSynchronizer(myAdapter).run();
}

sync();
```