-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from NillionNetwork/chore/update-metrics-sect…
…ions chore: Update nada metric sections
- Loading branch information
Showing
6 changed files
with
311 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
--- | ||
layout: | ||
title: | ||
visible: true | ||
description: | ||
visible: true | ||
tableOfContents: | ||
visible: true | ||
outline: | ||
visible: true | ||
pagination: | ||
visible: true | ||
--- | ||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
# Nada Execution Plan | ||
|
||
A Nada Program is made of a sequence of instructions (protocols) that to be executed by the nodes. However, these instructions are not executed in the order that they appear in the program, they are reorganized in an early stage according to the dependencies between them. The purpose of this process is to minimize the number of communication rounds. The result of this reorganization is called the Execution Plan for the program. The Execution Plan specifies the way that how the program will be executed inside the NilVM in each Nillion node. | ||
|
||
`nada` provides different ways to print the execution plan of a program. For instance, when we execute the command `nada run` with the flag `--metrics-execution-plan`. The result will be a set of metrics that are ordered following the Execution Plan. | ||
|
||
<Tabs> | ||
|
||
<TabItem value="metrics" label="Execution Plan metrics"> | ||
|
||
``` | ||
Summary: | ||
Preprocessing elements: | ||
Compare: 1 | ||
Execution metrics: | ||
Execution duration: | ||
5ms 880us 847ns | ||
Compute duration: | ||
total duration: 104us 787ns (min: 9us 715ns, max: 168us 126ns) | ||
Total rounds: 3 | ||
Total network messages size: 1.19 kB | ||
Local protocols: (execution order) | ||
Not: | ||
calls: 1 | ||
total duration: 9us 648ns (min: 6us 33ns, max: 21us 600ns) | ||
Online protocols: (execution order) | ||
LessThanShares: | ||
calls: 1 | ||
total duration: 892us 741ns (min: 819us 492ns, max: 1ms 154us 380ns) | ||
total network messages size: 1.19 kB | ||
Execution Plan: | ||
Step #0: | ||
Count of communication rounds: 3 | ||
Round #0 message size: 23 | ||
Round #1 message size: 1139 | ||
Round #2 message size: 23 | ||
Protocols: | ||
addr(2) - LessThanShares: | ||
Execution step: 0 | ||
Total duration: 892us 741ns | ||
Number of communication rounds: 3 | ||
Total message size: 1185 | ||
Used preprocessing elements: | ||
- Compare: 1 | ||
Step #1: | ||
Count of communication rounds: 0 | ||
Protocols: | ||
addr(3) - Not: | ||
Execution step: 1 | ||
Total duration: 9us 648ns | ||
Number of communication rounds: 0 | ||
Total message size: 0 | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="program" label="Nada Program"> | ||
```python reference showGithubLink | ||
https://github.com/NillionNetwork/nada-by-example/blob/main/src/comparison_gte.py | ||
``` | ||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
Looking at the resulting file, we can see that the Execution Plan organizes the protocols into Execution Steps. This is the group of protocols that can be executed in parallel, because all their inputs have been resolved in some previous step. The steps are divided into two stages: | ||
- Local: The [local protocols](/glossary#local-protocol) that are contained in the Execution Step. They are executed before the online protocols. | ||
- Online: Once the local protocols have been executed, the [online protocols](/glossary#online-protocol) of the step can be executed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
layout: | ||
title: | ||
visible: true | ||
description: | ||
visible: true | ||
tableOfContents: | ||
visible: true | ||
outline: | ||
visible: true | ||
pagination: | ||
visible: true | ||
--- | ||
|
||
# Nada Metrics | ||
The Nillion VM is able to calculate a number of useful execution metrics. | ||
|
||
The list below describes the available program execution metrics. | ||
|
||
#### Count of Communication Rounds | ||
Number of times that a specific instance of protocol exchanged data during its execution. | ||
|
||
#### Compute Duration | ||
|
||
The effective time was taken to execute the program's protocols by a node. | ||
|
||
#### Calls | ||
|
||
Number of times that a protocol's variant was called during the program execution. | ||
|
||
#### Duration | ||
|
||
The effective time that a node spent to execute a specific instance of a protocol. | ||
|
||
#### Execution Duration | ||
|
||
The time was taken to complete a program execution. | ||
|
||
#### Execution Step | ||
|
||
The step in the Execution Plan in which a protocol was executed. | ||
|
||
#### Local Protocols | ||
|
||
The number of [local protocol](/glossary#local-protocol) executed. | ||
|
||
#### Number of Communication rounds | ||
Number of times that a specific protocol's instance exchanged data during its execution. | ||
|
||
#### Online Protocols | ||
|
||
The number of [online protocols](/glossary#online-protocol) executed. | ||
|
||
#### Preprocessing elements | ||
|
||
Number of [preprocessing elements](/glossary#preprocessing-elements) used by the protocols during the execution. | ||
|
||
#### Round message size | ||
|
||
The amount of data exchanged during a specific communication round. | ||
|
||
#### Total Network Size | ||
|
||
The amount of data exchanged during a protocol's instance execution. | ||
|
||
#### Total Network Message Size | ||
|
||
The amount of data exchanged during the program execution. | ||
|
||
#### Total Rounds | ||
|
||
The number of times that the nodes have exchanged data between them during the program execution. | ||
|
||
#### Used preprocessing elements | ||
|
||
The amount of [preprocessing elements](/glossary#preprocessing-elements) that a protocol was used by during its execution. It also reports the amount of each type of preprocessing element that was needed. |
Oops, something went wrong.