You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-4Lines changed: 25 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,6 @@
7
7
8
8
`numero` is software for parsing and evaluating mathematical expressions. It is available as a library and as a web service.
9
9
10
-
## motivation
11
-
12
-
This project started as an exercise in doing some recreational programming. I always knew about the [shunting yard algorithm](https://en.wikipedia.org/wiki/Shunting_yard_algorithm) but never really got to implement it. Lately, I've been writing a lot of code in Go and decided to just do this.
13
-
14
10
## usage
15
11
16
12
The library can be used as follows.
@@ -59,6 +55,7 @@ curl --request POST \
59
55
## documentation
60
56
61
57
**Supported functions**
58
+
62
59
-`sin`
63
60
-`cos`
64
61
-`tan`
@@ -69,6 +66,7 @@ curl --request POST \
69
66
-`min`
70
67
71
68
**Supported operators**
69
+
72
70
-`+`
73
71
-`-`
74
72
-`*`
@@ -95,6 +93,25 @@ Response body:
95
93
}
96
94
```
97
95
96
+
### benchmarks
97
+
98
+
This runs a load test for 20 seconds. The test can be found [here](./benchmark/main.go). The tests were run on a 2021 Macbook Pro with an M1 chip.
99
+
100
+
```bash
101
+
make bench
102
+
```
103
+
| metric | value |
104
+
|---------------|---------|
105
+
| total requests| 30878 |
106
+
| successful requests| 30878|
107
+
| failed requests | 688 |
108
+
| connection errors| 688 |
109
+
| invalid responses| 0 |
110
+
| average latency | 1.02 ms|
111
+
| min latency | 0.06 ms|
112
+
| max latency | 36.12 ms|
113
+
| requests/second | 1543|
114
+
98
115
## contributing
99
116
100
117
I am happy to accept pull requests. No hard rules.
@@ -113,6 +130,10 @@ make test
113
130
make run-dev
114
131
```
115
132
133
+
## motivation
134
+
135
+
This project started as an exercise in doing some recreational programming. I always knew about the [shunting yard algorithm](https://en.wikipedia.org/wiki/Shunting_yard_algorithm) but never really got to implement it. Lately, I've been writing a lot of code in Go and decided to just do this.
136
+
116
137
## acknowledgements
117
138
118
139
created by Vivek Nathani ([@viveknathani_](https://twitter.com/viveknathani_)), licensed under the [MIT License](./LICENSE).
0 commit comments